|
| 1 | +name: PR Review with Progress Tracking |
| 2 | + |
| 3 | +on: |
| 4 | + issue_comment: |
| 5 | + types: [created] |
| 6 | + |
| 7 | +jobs: |
| 8 | + review-with-tracking: |
| 9 | + if: | |
| 10 | + github.event.issue.pull_request && contains(github.event.comment.body, '@claude') |
| 11 | + runs-on: ubuntu-latest |
| 12 | + permissions: |
| 13 | + contents: read |
| 14 | + pull-requests: write |
| 15 | + id-token: write |
| 16 | + steps: |
| 17 | + - name: Checkout repository |
| 18 | + uses: actions/checkout@v5 |
| 19 | + with: |
| 20 | + fetch-depth: 1 |
| 21 | + |
| 22 | + - name: PR Review with Progress Tracking |
| 23 | + uses: anthropics/claude-code-action@v1 |
| 24 | + with: |
| 25 | + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 26 | + track_progress: true |
| 27 | + prompt: | |
| 28 | + REPO: ${{ github.repository }} |
| 29 | + PR NUMBER: ${{ github.event.pull_request.number }} |
| 30 | +
|
| 31 | + Perform a comprehensive code review with the following focus areas: |
| 32 | +
|
| 33 | + 1. **Code Quality** |
| 34 | + - Clean code principles and best practices |
| 35 | + - Proper error handling and edge cases |
| 36 | + - Code readability and maintainability |
| 37 | +
|
| 38 | + 2. **Security** |
| 39 | + - Check for potential security vulnerabilities |
| 40 | + - Validate input sanitization |
| 41 | + - Review authentication/authorization logic |
| 42 | +
|
| 43 | + 3. **Performance** |
| 44 | + - Identify potential performance bottlenecks |
| 45 | + - Review database queries for efficiency |
| 46 | + - Check for memory leaks or resource issues |
| 47 | +
|
| 48 | + 4. **Testing** |
| 49 | + - Verify adequate test coverage |
| 50 | + - Review test quality and edge cases |
| 51 | + - Check for missing test scenarios |
| 52 | +
|
| 53 | + 5. **Documentation** |
| 54 | + - Ensure code is properly documented |
| 55 | + - Verify README updates for new features |
| 56 | + - Check API documentation accuracy |
| 57 | +
|
| 58 | + Provide detailed feedback using inline comments for specific issues. |
| 59 | + Use top-level comments for general observations or praise. |
| 60 | +
|
| 61 | + claude_args: | |
| 62 | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" |
0 commit comments