bhaskarjhainfrovate/ai-pr-review

GitHub: bhaskarjhainfrovate/ai-pr-review

结合静态分析与大语言模型,自动对 GitHub pull request 进行代码质量、安全性和最佳实践审查并发布评论的开源工具。

Stars: 0 | Forks: 0

# AI 代码审查 此应用程序连接到 GitHub,分析 pull request,运行确定性的代码分析工具,并使用 LLM 生成人类可读的审查评论。 开发者的操作流程如下: 1. 使用 GitHub 登录。 2. 将你的 GitHub App 安装到某个代码库。 3. 创建或更新 pull request。 4. 你的应用程序将接收到一个 GitHub webhook。 5. 它会下载 PR diff 和修改过的文件。 6. 静态分析工具检查代码。 7. LLM 会解释关键问题并提出改进建议。 8. 应用程序在 GitHub PR 上发布摘要和内联评论。 9. 结果显示在你的 dashboard 中。 # 应用程序流程 ``` Developer opens a pull request │ ▼ GitHub sends pull_request webhook │ ▼ Your backend verifies webhook signature │ ▼ Create a review job in the database │ ▼ Fetch PR metadata, files and patch │ ▼ Filter generated and unsupported files │ ▼ Run static-analysis tools │ ▼ Divide code into reviewable chunks │ ▼ Send code and tool findings to LLM │ ▼ Validate LLM JSON response │ ▼ Remove duplicates and low-confidence findings │ ▼ Calculate quality score │ ▼ Post summary and inline comments to GitHub │ ▼ Display review in dashboard ```
标签:AI代码审查, C2, GitHub集成, NestJS, 自动化攻击, 错误基检测, 静态代码分析