mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
improve continuous review (#2271)
- Re-enable synchronize trigger for automatic re-reviews on each push - Add logic to detect and resolve fixed issues automatically - Focus reviews only on critical bugs, security, breaking changes, test failures - Limit to 5-7 high-signal comments per review - Review only changed files on re-reviews (incremental approach) - Add detailed PR review guidelines in CLAUDE.md - Increase fetch-depth to 2 for commit comparison This reduces review noise while maintaining continuous quality checks. # Pull Request Checklist ## Description - [ ] **Description of PR**: Clear and concise description of what this PR accomplishes - [ ] **Breaking Changes**: Document any breaking changes (if applicable) - [ ] **Related Issues**: Link to any related issues or tickets ## Testing - [ ] **Test cases Attached**: All relevant test cases have been added/updated - [ ] **Manual Testing**: Manual testing completed for the changes ## Monitoring & Debugging - [ ] **Logging in place**: Appropriate logging has been added for debugging user issues - [ ] **Sentry will be able to catch errors**: Error handling ensures Sentry can capture and report errors - [ ] **Avoid Dev based/Prisma logging**: No development-only or Prisma-specific logging in production code ## Configuration - [ ] **Env variables newly added**: Any new environment variables are documented in .env.example file or mentioned in description --- ## Additional Notes <!-- Add any additional context, screenshots, or notes for reviewers here -->
This commit is contained in:
parent
8c75f238ed
commit
3ac7eb5982
2 changed files with 54 additions and 12 deletions
40
.github/workflows/claude.yml
vendored
40
.github/workflows/claude.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
|
|
@ -43,19 +43,35 @@ jobs:
|
|||
${{ github.event_name == 'pull_request' && format('
|
||||
REPO: {0}
|
||||
PR NUMBER: {1}
|
||||
EVENT: {2}
|
||||
|
||||
Please review this pull request and provide feedback on:
|
||||
- Code quality and best practices
|
||||
- Potential bugs or issues
|
||||
- Performance considerations
|
||||
- Security concerns
|
||||
- Test coverage
|
||||
{3}
|
||||
|
||||
Use the repository CLAUDE.md for guidance on style and conventions.
|
||||
Use `gh pr comment` for top-level feedback.
|
||||
Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues.
|
||||
Be constructive and helpful in your feedback.
|
||||
', github.repository, github.event.pull_request.number) || '' }}
|
||||
IMPORTANT:
|
||||
- First check existing review comments using `gh api repos/{0}/pulls/{1}/comments`. For each existing comment, check if the issue still exists in the current code.
|
||||
- If an issue is fixed, use `gh api --method PATCH repos/{0}/pulls/comments/COMMENT_ID -f body="✅ Fixed in latest commit"` to resolve it.
|
||||
- Only create NEW inline comments for HIGH-PRIORITY issues found in changed files.
|
||||
- Limit to 5-7 NEW comments maximum per review.
|
||||
- Use CLAUDE.md for project-specific guidance.
|
||||
- Use `gh pr comment` for summary-level feedback.
|
||||
- Use `mcp__github_inline_comment__create_inline_comment` sparingly for critical code issues only.
|
||||
', github.repository, github.event.pull_request.number, github.event.action, github.event.action == 'synchronize' && '
|
||||
This is a RE-REVIEW after new commits.
|
||||
|
||||
1. First, get the list of changed files in this latest push using `gh pr diff`
|
||||
2. Review ONLY the changed files focusing on:
|
||||
- Critical bugs or logic errors
|
||||
- Security vulnerabilities
|
||||
- Breaking API changes
|
||||
- Test failures (methods with typos that won''t run)
|
||||
3. Check ALL existing review comments and resolve ones that are now fixed' || '
|
||||
This is the INITIAL REVIEW.
|
||||
|
||||
Review this PR focusing ONLY on:
|
||||
1. Critical bugs or logic errors
|
||||
2. Security vulnerabilities
|
||||
3. Breaking API changes
|
||||
4. Test failures (methods with typos that won''t run)') || '' }}
|
||||
claude_args: ${{ github.event_name == 'pull_request' && '--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh issue view:*),Bash(gh issue list:*),Read,Glob,Grep"' || '' }}
|
||||
additional_permissions: |
|
||||
actions: read
|
||||
|
|
|
|||
26
CLAUDE.md
Normal file
26
CLAUDE.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Claude Code Instructions
|
||||
|
||||
@AGENTS.md
|
||||
|
||||
## PR Review Guidelines
|
||||
|
||||
When reviewing PRs, follow these priorities:
|
||||
|
||||
### CRITICAL - Always comment:
|
||||
- Logic errors or bugs that will cause failures
|
||||
- Security vulnerabilities
|
||||
- Test method names with typos (won't be discovered by test runner)
|
||||
- Breaking changes without migration path
|
||||
|
||||
### SKIP - Don't comment on:
|
||||
- Code style or formatting (we have linters for this)
|
||||
- Suggestions for additional features or refactoring
|
||||
- "Consider" or "might want to" suggestions
|
||||
- Performance optimizations without profiling data
|
||||
- Duplicate concerns (one comment per issue)
|
||||
|
||||
### Process:
|
||||
1. Check if previous comments on same lines are now fixed - resolve those first
|
||||
2. Limit to 5-7 high-signal comments per review
|
||||
3. Group related issues into one comment when possible
|
||||
4. If many issues exist, use a summary comment instead of 20+ inline comments
|
||||
Loading…
Reference in a new issue