Loading...
Loading...
Run comprehensive PR checks including reviewing CodeRabbit comments, ensuring PR description quality, running pre-commit hooks, tests, and validation. Use on an existing PR to address review feedback.
npx skill4agent add massgen/massgen pr-checks/pr-checks# Check current branch and status
git branch --show-current
git status --short
# Show diff summary vs main
git diff --stat main...HEAD
# Get the PR number for this branch
gh pr view --json number,title,state# View current PR description
gh pr view --json body,titleCloses MAS-XXX# Update the PR description
gh pr edit --body "$(cat <<'EOF'
## Summary
<1-2 sentence overview of what this PR accomplishes>
### Changes
- <change 1: what was added/modified/removed>
- <change 2>
- <change 3>
- ...
### Technical details (if applicable)
<Brief explanation of implementation approach, architectural decisions, or non-obvious changes>
## Test plan
- [ ] <verification step 1>
- [ ] <verification step 2>
- [ ] <edge case or error scenario tested>
## Related issues
Closes MAS-XXX
## Screenshots/recordings (if applicable)
<Add screenshots for UI changes, terminal output for CLI changes>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"# Update PR title
gh pr edit --title "feat: descriptive title here"/pr-comments/pr-comments## CodeRabbit Comment #1 of 5
**File:** `massgen/backend/foo.py:45`
**Original code:**
```python
response = client.api_call(params)
return response.dataConsider adding error handling for the API call. The request could fail due to network issues or API errors, which would cause an unhandled exception. This is especially important since this is called from the main orchestration loop where failures could crash the entire run. [truncated - 8 more lines]
try:
response = client.api_call(params)
return response.data
except APIError as e:
logger.error(f"API call failed: {e}")
raise
**After user decides, resolve the comment on GitHub:**
```bash
# If implemented or intentionally skipped, resolve the comment thread
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread { isResolved }
}
}
'# Reply to the comment
gh pr comment <PR_NUMBER> --body "Addressed in <commit-sha>: <brief description of fix>"uv run pre-commit run --all-files# Run tests (skip expensive API tests)
uv run pytest massgen/tests/ -v -m "not expensive and not docker" -x --tb=shortuv run python scripts/validate_all_configs.py# Stage fixes
git add -u .
# Commit with descriptive message
git commit -m "fix: address CodeRabbit review comments
- Fix error handling in foo.py
- Add missing type hints in bar.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>"
# Push to trigger CodeRabbit re-review
git push/pr-review-toolkit:review-prcoderabbit --prompt-only --type committed## PR Checks Summary
### Branch: feature/my-feature
- PR #123: "feat: add new feature"
- Commits ahead of main: 3
- Files changed: 5
### PR Description
✅ Has summary, test plan, and issue links
### CodeRabbit Comments Addressed
| Comment | File | Action |
|---------|------|--------|
| Add error handling | foo.py:45 | ✅ Implemented |
| Consider caching | bar.py:12 | ❌ Skipped (not applicable) |
| Missing type hint | baz.py:78 | ✅ Implemented |
### Check Results
| Check | Status |
|-------|--------|
| Pre-commit | ✅ Passed |
| Tests | ✅ 47 passed |
| Config Validation | ✅ Valid |
### Ready for Merge?
✅ All critical issues addressed, ready for final review## Summary
<1-2 sentence overview of what this PR accomplishes>
### Changes
- <change 1: what was added/modified/removed>
- <change 2>
- <change 3>
### Technical details (if applicable)
<Implementation approach, architectural decisions, or non-obvious changes>
## Test plan
- [ ] Step to verify functionality
- [ ] Edge cases tested
- [ ] Error scenarios handled
## Related issues
Closes MAS-XXX
## Screenshots/recordings (if applicable)
<For UI/CLI changes>
## Breaking changes (if applicable)
<What breaks and migration steps>feat:fix:docs:refactor:perf:test:chore:@pytest.mark.expensive@pytest.mark.docker.coderabbit.yaml