This commit is contained in:
Build Bot
2026-04-21 01:30:00 +08:00
parent 1f50735dd5
commit f449ec11d0
2 changed files with 39 additions and 1 deletions

View File

@@ -9,4 +9,4 @@
- 报告发到对应频道 - 报告发到对应频道
## 难点 ## 难点
- 如何mock数据 - 如何mock数据
- 如何识别出改动的地方的不同伪造数据的表现? - 如何识别出改动的地方的不同伪造数据的表现?

View File

@@ -0,0 +1,38 @@
完成!我为你创建了完整的 **Jenkins + Claude Code 自动代码审查** 方案。
## 创建的文件
| 文件 | 说明 |
| ----------------------------------- | --------------------------------- |
| `scripts/ci/claude_code_review.sh` | Bash 版本审查脚本(生成提示文件) |
| `scripts/ci/claude_code_review.bat` | Windows 版本审查脚本 |
| `scripts/ci/claude_api_review.py` | Claude API 自动审查Python |
| `docs/jenkins-claude-review.md` | 完整配置文档 |
| 修改 `Jenkinsfile` | 新增 `Claude Code Review` stage |
## 工作流程
```
Git Push ──► Jenkins ──► Unity Build ──► Airtest ──► Claude Review ──► 归档报告
```
## 使用方式
### 方式一:手动审查(无需 API Key
构建完成后下载 `Logs/ci/reviews/*-review-prompt.md`,然后在 Claude Code 中打开:
```bash
claude < review-prompt.md
```
### 方式二API 自动审查
1. Jenkins 安装 Python 依赖:`pip install anthropic`
2. Jenkins 配置凭据 ID 为 `anthropic-api-key` 的 Secret text
3. 构建完成后自动调用 Claude API 生成审查报告
## Jenkinsfile 关键修改
- **新增 stage**: `Claude Code Review`(在 `Publish Project Build` 之后)
- **权限更新**: 添加了 `claude_code_review.sh``claude_api_review.py` 的执行权限
- **产物归档**: 包含 `Logs/ci/reviews/**` 中的所有审查文件
需要我帮你配置 Jenkins 凭据或测试这个流程吗?