代码审查集成工具

Manus AI与CodeRabbit MCP Server的集成项目,提供自动代码审查和编程质量改进功能。

  • by MSAMSA56
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 MSAMSA56/manus-coderabbit-integration

使用说明

Manus-CodeRabbit集成

📋概述

整合项目 人工智能 和 CodeRabbit MCP服务器 自动审查代码并提高编程质量。

🎯功能

  • ✅ 使用CodeRabbit进行自动代码审查
  • 🔄 与Manus AI无缝集成
  • 🛠 通过自定义审核规则 .coderabbit.yaml
  • 📝 自动问题检测和修复
  • 🚀 CI/CD工作流自动化
  • 🔐 安全的环境变量管理

📦要求

  • Node.js V14或更高版本
  • npm (附带Node.js)
  • 账户 GitHub 访问权限(PAT)
  • 账户 CodeRabbit API密钥

安装

1.克隆存储库

git clone https://github.com/MSAMSA56/manus-coderabbit-integration.git
cd manus-coderabbit-integration

2.安装依赖项

npm install

3.配置环境变量

复制 .env.example 到 .env 并添加您的凭据:

cp .env.example .env

编辑 .env:

GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_actual_token_here
GITHUB_PAT=ghp_your_actual_token_here
CODERABBIT_API_KEY=cr-your_actual_key_here
CODERABBIT_BASE_URL=https://api.coderabbit.ai/api/v1
CODERABBIT_LOG_LEVEL=info

4.设置克劳德桌面(可选)

对于macOS:

# Edit: ~/Library/Application Support/Claude/claude_desktop_config.json

对于Windows:

# Edit: %APPDATA%\Claude\claude_desktop_config.json

使用以下配置 claude_desktop_config.json 文件。


🔧使用

运行工作流程

node index.js

自动工作流程(6个步骤)

  1. 实施优势Manus编写代码
  2. 建立PR在GitHub上上传Pull Request
  3. CodeRabbit评论自动分析代码
  4. 结果分析阅读发现的问题
  5. 自动维修Manus解决问题
  6. 整合批准后合并PR

项目结构

manus-coderabbit-integration/
├── .coderabbit.yaml          # CodeRabbit custom rules
├── .env.example               # Environment variables template
├── .gitignore                 # Git ignore file
├── claude_desktop_config.json # Claude Desktop MCP configuration
├── index.js                   # Main workflow implementation
├── package.json               # Project dependencies
└── README.md                  # This file

⚙️高级配置

档案 .coderabbit.yaml

包含自定义审查规则:

  • TypeScript评论物种安全检查
  • 审查测试确保覆盖范围
  • 特别规则阻止console.log,强制进行错误处理

CodeRabbit MCP工具

// مثال: تحليل Pull Request
await tools.analyzepullrequest({
  repository: 'owner/repo',
  pullRequestNumber: 123,
  reviewInstructions: 'Check for security and performance'
});

📚资源


贡献

欢迎投稿!拜托:

  1. 分叉存储库
  2. 创建功能分支
  3. 提交您的更改
  4. 推到分支
  5. 创建拉取请求

许可证

MIT许可证-有关详细信息,请参阅许可证文件


沟通

有关问题和支持,请打开 问题


内置于❤️ 通过MSAMSA56