{"id":29875951,"url":"https://github.com/monto-fe/code-review","last_synced_at":"2025-07-31T03:02:03.818Z","repository":{"id":295997095,"uuid":"991972350","full_name":"monto-fe/code-review","owner":"monto-fe","description":"基于DeepSeek等大模型开发的Code Review服务（适用于Gitlab）","archived":false,"fork":false,"pushed_at":"2025-07-29T12:52:29.000Z","size":49288,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T13:55:42.662Z","etag":null,"topics":["ai","code-review","codereview","gitlab","gpt","llm","rag"],"latest_commit_sha":null,"homepage":"https://code-review-home.vercel.app/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monto-fe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-28T12:29:24.000Z","updated_at":"2025-07-29T12:52:35.000Z","dependencies_parsed_at":"2025-07-18T16:41:32.670Z","dependency_job_id":null,"html_url":"https://github.com/monto-fe/code-review","commit_stats":null,"previous_names":["monto-fe/code-review"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/monto-fe/code-review","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monto-fe%2Fcode-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monto-fe%2Fcode-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monto-fe%2Fcode-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monto-fe%2Fcode-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monto-fe","download_url":"https://codeload.github.com/monto-fe/code-review/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monto-fe%2Fcode-review/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267979246,"owners_count":24175272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","code-review","codereview","gitlab","gpt","llm","rag"],"created_at":"2025-07-31T03:00:37.185Z","updated_at":"2025-07-31T03:02:03.792Z","avatar_url":"https://github.com/monto-fe.png","language":"Go","readme":"# 🚦 Code Review 项目\n\n基于 **AI 的自动化代码审查系统**，支持 GitLab Merge Request 审查，可通过 Docker Compose 一键启动服务与数据库。\n\n---\n\n## 🚀 快速启动\n\n\u003e ✅ 支持 **MySQL**（推荐版本：`8.0`）与 **MariaDB**（推荐版本：`10.5`）\n\n**环境依赖**\n\n- docker \u0026\u0026 docker compose \u003e 2.0\n- git\n- 虚拟机配置最小配置\n  - 支持RAG增强检索：4C16G100G\n  - 不需要RAG增强检索：2C8G50G\n\n### 1️⃣ 克隆项目\n\n```bash\ngit clone https://github.com/monto-fe/code-review.git\ncd code-review\n```\n\n---\n\n### 2️⃣ 配置环境变量\n\n\u003e 假设服务器 IP 为：`192.168.1.1`\n\n#### 方式一：使用自有数据库\n\n```bash\n# 先在数据库中执行初始化 SQL 脚本\ncd mysql/init\n\n# 编辑环境变量\nvi .env\n\n# 服务启动\ndocker compose up -d\n```\n\n#### 方式二：使用内置 MySQL\n\n```bash\ncp .env.mysql .env\nvi .env  # 修改数据库密码等必要配置\ndocker compose -f docker-compose.mysql.yml up -d\n```\n\n#### 方式三：使用内置 MariaDB\n\n```bash\ncp .env.mariadb .env\nvi .env\ndocker compose -f docker-compose.mariadb.yml up -d\n```\n\n---\n\n### 3️⃣ 访问控制台\n\n在浏览器中访问：\n\n\u003e 🌐 地址：[http://192.168.1.1:9003](http://192.168.1.1:9003)\n\u003e 🔐 默认账号密码：admin / 12345678\n\n#### 控制台示意图：\n\n![控制台](https://picture.questionlearn.cn/blog/picture/1746626120106.png)\n\n首次登录请配置以下内容：\n\n* ✅ AI 模型 Key（支持主流模型）\n* ✅ GitLab Token（需具备完整权限）\n* ✅ 企业微信机器人（可选）\n\n---\n\n## 📡 配置 Webhook（GitLab）\n\n### 方法一：直接在管理员Gitlab账户中配置系统钩子\n\n### 方法二：\n\n在对应项目中：\n\n\u003e `Settings` ➜ `Webhooks`\n\n添加如下地址：\n\n```\nhttp://192.168.1.1:9000/v1/webhook/merge\n```\n\n\u003e ✅ 如果 GitLab 支持 Group Webhook，推荐在 Group 层级统一配置。\n\n勾选事件类型：**Merge request events**\n\n提交 Merge Request 时将自动触发 AI 审查。\n\n#### Webhook 配置示意：\n\n![Webhook配置](https://picture.questionlearn.cn/blog/picture/1746626508783.png)\n\n#### AI 检查示例：\n\n![Webhook触发](https://picture.questionlearn.cn/blog/picture/1746626303888.png)\n\n---\n\n## ❓ 常见问题\n\n| 问题      | 解决方案                                     |\n| ------- | ---------------------------------------- |\n| 镜像拉取失败  | 检查网络连接，或替换为国内镜像源                         |\n| 启动后无法访问 | 检查服务器防火墙，确保开放端口 `9000` 与 `9003`          |\n| 无法连接数据库 | 数据库可能启动较慢，执行 `docker compose restart` 重试 |\n\n---\n\n## 📝 更新日志\n\n* ✅ 支持自定义 GitLab 地址\n* ✅ 支持多个 GitLab Token\n* ✅ 支持 webhook 推送 AI 检查结果\n* ✅ 提供快速部署方案\n* ✅ 集成 DeepSeek、UCloud 模型，支持切换私有/公有大模型\n* ✅ 提供一键启动的 Docker 镜像（支持挂载配置）\n* ✅ 优化 GitLab Token 添加/更新流程，自动刷新模型缓存\n* ✅ 支持自定义提示词检测代码\n* ✅ 支持RAG检索代码仓库\n* ✅ 支持行级评论\n\n---\n\n## 🔭 规划中功能\n\n* [ ] 支持通过 `projectId + mergeId` 直接发起 AI 审查\n* [ ] 支持读取回复评论信息\n* [ ] 完成控制台权限管理能力\n* [ ] 支持Qwen大模型\n* [ ] 支持Kimi k2模型\n* [ ] 根据description描述信息，搜索对应的需求注意事项，进行检测\n* [ ] 支持监听 GitLab Push 事件","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonto-fe%2Fcode-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonto-fe%2Fcode-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonto-fe%2Fcode-review/lists"}