11name : PR Review with Progress Tracking
22
3- # This example demonstrates how to use the track_progress feature to get
4- # visual progress tracking for PR reviews, similar to v0.x agent mode.
5-
63on :
74 pull_request :
85 types : [opened, synchronize, ready_for_review, reopened]
@@ -18,57 +15,91 @@ jobs:
1815 - name : Checkout repository
1916 uses : actions/checkout@v5
2017 with :
21- fetch-depth : 1
18+ fetch-depth : 0
2219
2320 - name : PR Review with Progress Tracking
2421 uses : anthropics/claude-code-action@v1
2522 with :
2623 anthropic_api_key : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
2724
28- # Enable progress tracking
2925 track_progress : true
3026
31- # Your custom review instructions
3227 prompt : |
3328 REPO: ${{ github.repository }}
3429 PR NUMBER: ${{ github.event.pull_request.number }}
3530
3631 Perform a comprehensive code review with the following focus areas:
3732
38- 1. **Code Quality**
39- - Clean code principles and best practices
40- - Proper error handling and edge cases
41- - Code readability and maintainability
33+ ## 1. Release Workflow Compliance (CRITICAL)
4234
43- 2. **Security**
44- - Check for potential security vulnerabilities
45- - Validate input sanitization
46- - Review authentication/authorization logic
35+ This project uses Release Please with Conventional Commits. Check:
4736
48- 3. **Performance**
49- - Identify potential performance bottlenecks
50- - Review database queries for efficiency
51- - Check for memory leaks or resource issues
37+ **Commit Message Format:**
38+ - All commits MUST follow conventional commit format: `type(scope): description`
39+ - Valid types: `feat`, `fix`, `perf`, `refactor`, `docs`, `test`, `ci`, `build`, `chore`, `style`
40+ - Type must be lowercase
41+ - Description must be lowercase and not end with a period
42+ - Breaking changes must include `BREAKING CHANGE:` in the commit footer
5243
53- 4. **Testing**
54- - Verify adequate test coverage
55- - Review test quality and edge cases
56- - Check for missing test scenarios
44+ **Version Bump Rules (explain to contributor):**
45+ - `feat:` → Minor version bump (0.4.0 → 0.5.0)
46+ - `fix:`, `perf:`, `refactor:` → Patch version bump (0.4.0 → 0.4.1)
47+ - `docs:`, `test:`, `ci:`, `build:`, `chore:`, `style:` → No version bump
48+ - `BREAKING CHANGE:` footer → Major version bump
5749
58- 5. **Documentation **
59- - Ensure code is properly documented
60- - Verify README updates for new features
61- - Check API documentation accuracy
50+ **If commits don't follow the format: **
51+ - List each non-compliant commit
52+ - Show the correct format it should use
53+ - Suggest squashing/rewording before merge
6254
63- Provide detailed feedback using inline comments for specific issues.
64- Use top-level comments for general observations or praise.
55+ Run this command to check commits:
56+ ```
57+ git log --oneline origin/main..HEAD
58+ ```
6559
66- # Tools for comprehensive PR review
67- claude_args : |
68- --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
60+ ## 2. Code Quality
61+ - Clean code principles and best practices
62+ - Proper error handling and edge cases
63+ - Code readability and maintainability
64+
65+ ## 3. Security
66+ - Check for potential security vulnerabilities
67+ - Validate input sanitization
68+ - Review authentication/authorization logic
69+ - Check for secrets or credentials in code
70+
71+ ## 4. Performance
72+ - Identify potential performance bottlenecks
73+ - Check for memory leaks or resource issues
74+
75+ ## 5. Testing
76+ - Verify adequate test coverage for new features
77+ - Review test quality and edge cases
78+
79+ ## 6. Documentation
80+ - New features should update README.md if user-facing
81+ - Breaking changes should be clearly documented
82+
83+ ## Review Output Format
6984
70- # When track_progress is enabled:
71- # - Creates a tracking comment with progress checkboxes
72- # - Includes all PR context (comments, attachments, images)
73- # - Updates progress as the review proceeds
74- # - Marks as completed when done
85+ Start your review with a **Release Compliance Summary**:
86+
87+ ```
88+ ## Release Compliance Check
89+
90+ | Commit | Format | Type | Valid |
91+ |--------|--------|------|-------|
92+ | abc123 | feat: add feature | feat | ✅ |
93+ | def456 | Update readme | INVALID | ❌ |
94+
95+ **Action Required:** [Yes/No]
96+ ```
97+
98+ If any commits are invalid, provide clear instructions on how to fix them
99+ (e.g., interactive rebase commands).
100+
101+ Then proceed with the rest of the code review using inline comments
102+ for specific issues and top-level comments for general observations.
103+
104+ claude_args : |
105+ --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git log:*),Bash(git show:*)"
0 commit comments