Code-Review-GPT-Gitlab

Code-Review-GPT-Gitlab

🤖 GPT( Deepseek and more ) Code Review for Gitlab (针对于 Gitlab 的 LLM 辅助 Code Review 工具)项目详细文档 👇🏻

Stars: 233

Visit
 screenshot

A project that utilizes large models to help with Code Review on Gitlab, aimed at improving development efficiency. The project is customized for Gitlab and is developing a Multi-Agent plugin for collaborative review. It integrates various large models for code security issues and stays updated with the latest Code Review trends. The project architecture is designed to be powerful, flexible, and efficient, with easy integration of different models and high customization for developers.

README:

项目描述 📚

一个利用大模型帮助我们在 Gitlab 上进行 Code Review 提升研发效能的项目 💪🏻 (( 包括但不限于 GPT 、DeepSeek 等🎁))

这个项目有什么特点? ✨

🐶 针对于 Gitlab 定制 (计划支持 Github 、Gitlab 、Gitee 、Bitbucket 等)

🤖 我们正在开发 Multi-Agent 的插件,多个 Agent 协同工作,共同完成评审

🐱 结合了 多种大模型对接 的能力 🚀

🦊 能够接入私有化 LLM 代码安全问题

🦁 我们将一直关注效能研发 最新的Coder Review动态 融入这个项目

项目架构 🚗

前期架构

🚀 全新架构升级:更强大、更灵活、更高效! 🌈

🌟 丰富的模型接入 支持轻松接入更多的模型,无论是经典模型还是最新的 AI 模型,都能轻松集成!

🔧 高度定制化   开发者可以便捷地自定义处理逻辑和回复机制,打造专属于你的解决方案!

🔗 扩展性强    模块化设计使得功能扩展更加方便,未来可以轻松添加新功能,满足不断变化的需求!

🛠️ 高可维护性   代码结构清晰,注释详细,便于维护和二次开发,减少开发者的负担!

快来体验我们的新架构吧,享受前所未有的强大功能和极致体验!✨

功能预览 🌈

1. Gitlab Merge Request 触发评论

2. 钉钉消息通知

3. 更多种大模型接入

  1. 可通过实现项目接口快速接入自定义模型,具体配置方式参见config.md
  2. 项目通过UnionLLM进行多模型支持, 兼容LiteLLM,默认支持模型如下表所示。
阿里巴巴通义千问
OpenAI 🔥 Azure AWS - SageMaker AWS - Bedrock
Google - Vertex_AI Google - Palm Google AI Studio - Gemini Mistral AI API
Cloudflare AI Workers Cohere Anthropic Empower
Huggingface Replicate Together_AI OpenRouter
AI21 Baseten Vllm NLP_Cloud
Aleph Alpha Petals Ollama Deepinfra
Perplexity-AI Groq AI DeepSeek Anyscale
IBM - Watsonx.ai Voyage AI Xinference [Xorbits Inference] FriendliAI
Galadriel 智谱AI 月之暗面 Moonshot 百度文心一言
MiniMax 讯飞星火 百川智能
昆仑天工 零一万物 阶跃星辰 字节豆包
深度求索 DeepSeek 🔥 More

4.自定义更多的通知方式和处理手段

  1. 可通过实现自定义Response类添加如邮箱,私有机器人等多种通知方式,具体教程参见response.md
  2. 可通过自定义更多的Review Handle引入自定义的代码审查逻辑,具体教程参见review.md

部署 📖

Docker 运行

docker run -d -v ./config:/workspace/config -p 8080:80 --name codereview xuxin1/llmcodereview:latest

源代码运行 💻

1.克隆仓库

git clone [email protected]:mimo-x/Code-Review-GPT-Gitlab.git

2.安装依赖

pip install -r requirements.txt

3.修改配置文件

vim config/config.py

4.运行

python3 app.py

配置Gitlab webhook

填写Webhook URL时,请在域名后添加路径/git/webhook,例如:http://example.com/git/webhook

尝试发起一个 Merge Request 吧🎉

待办清单 📌

  • ✅ 使用 GPT 进行Code Review
  • ✅ 实现多模型支持
  • [ ] 可以配置更多的触发方式
    • ✅ Merge Request
    • [ ] commit
    • [ ] tag
  • [ ] 兼容飞书的消息通知
  • [ ] 兼容钉钉的消息通知
  • [ ] 结合静态代码分析来提供修改代码的风险等级
  • [ ] 通过pydantic实现大模型输出内容的格式化
  • ✅ 支持插件式自定义 Review 的问题

交流 👨‍👨‍👦‍👦

👏🏻 很高兴你能向我们提出一些问题和修改建议(Issue,PR), 欢迎 star 项目 ⭐️

📮 Email[email protected]

📱 wxisxuxin

👨‍👨‍👦‍👦 如果有任何使用问题,欢迎来这里交流(AI 研发效能领域) 👋

参考文献 📚

Star History

Star History Chart

本项目由 Mobvista 汇量科技 的技术团队研发及发布。

Mobvista 汇量科技 是全球领先的开发者增长平台。我们为全球开发者和营销人员提供完整的广告和分析工具套件,包括用户获取、变现、分析、创意自动化和智能媒体采买等,能大幅提升广告营销ROI,有效帮助移动应用突破增长平台期。

This tool is developed by the engineering team at Mobvista.

Mobvista is a leading mobile technology company that provides a complete suite of advertising and analytics tools for app developers and marketers seeking global growth. Offering a range of tailored solutions, such as user acquisition, monetization, analytics, creative automation, and cross-channel media buying, Mobvista enables mobile businesses to maximize their potential.

For more information, please visit our website: www.mobvista.com

License 📑

github license This project is licensed under the MIT License.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for Code-Review-GPT-Gitlab

Similar Open Source Tools

For similar tasks

For similar jobs