feat: add ai-devel & auto review #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Review with Progress Tracking | |
| # This example demonstrates how to use the track_progress feature to get | |
| # visual progress tracking for PR reviews, similar to v0.x agent mode. | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, ready_for_review, reopened] | |
| jobs: | |
| review-with-tracking: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: PR Review with Progress Tracking | |
| uses: anthropics/claude-code-action@v1 | |
| env: | |
| ANTHROPIC_BASE_URL: "${{ secrets.ANTHROPIC_BASE_URL }}" | |
| CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: 1 | |
| CLAUDE_CODE_ATTRIBUTION_HEADER: 0 | |
| with: | |
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | |
| # Enable progress tracking | |
| track_progress: true | |
| # Your custom review instructions | |
| prompt: | | |
| REPO: ${{ github.repository }} | |
| PR NUMBER: ${{ github.event.pull_request.number }} | |
| review 这个 PR,给出详细的反馈,用英文思考,用中文回复。请从以下几个方面进行综合评审: | |
| 1. **代码质量** | |
| - 是否遵循了清晰的代码原则和最佳实践 | |
| - 是否有适当的错误处理和边界情况考虑 | |
| - 代码的可读性和可维护性 | |
| - 是否存在过度设计,产生不必要的复杂性或重复代码 | |
| 2. **安全性** | |
| - 是否存在潜在的安全漏洞 | |
| - 输入是否进行了适当的清理和验证 | |
| - 认证/授权逻辑是否正确 | |
| 3. **性能** | |
| - 是否存在潜在的性能瓶颈 | |
| - 数据库查询是否高效 | |
| - 是否存在内存泄漏或资源问题 | |
| 4. **测试** | |
| - 测试覆盖率是否足够 | |
| - 测试质量和边界情况是否充分 | |
| - 是否存在缺失的测试场景 | |
| 5. **文档** | |
| - 代码是否有适当的文档 | |
| - README 是否更新了新功能 | |
| - API 文档是否准确 | |
| 请针对每个问题提供具体的代码行号和建议改进措施。对于任何发现的问题,请提供一个简要的解释,说明为什么这是一个问题以及如何修复它。 | |
| claude_args: | | |
| --max-turns 100 | |
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" |