Review PR Comments
Review all unresolved comments on a GitHub pull request, categorize them, and optionally address each one.
Usage
/review-pr-comments [PR-NUMBER]
- •If no PR number provided, auto-detect from current branch
- •Explicit PR number overrides auto-detection
Process
1. Identify PR
If $ARGUMENTS is empty, auto-detect:
gh pr list --head $(git branch --show-current) --json number,title --jq '.[0]'
If $ARGUMENTS contains a PR number, use that directly.
2. Fetch Comments
Fetch Greptile review comments using the script:
bun run pr-comments -- <PR_NUMBER>
Also fetch general PR conversation comments:
gh api repos/{owner}/{repo}/issues/<PR>/comments
3. Filter and Categorize
Filter out resolved comments - only process unresolved/pending comments.
Categorize remaining comments into:
Required Changes
- •Explicit requests for code changes
- •Bug fixes or correctness issues
- •Security concerns
Suggestions
- •Optional improvements
- •Style preferences
- •Alternative approaches
Questions
- •Clarification requests
- •Design decisions to discuss
4. Present Summary
Display organized summary with:
- •Comment author
- •File/line reference (if applicable)
- •Comment content
- •Category
5. Address Comments
After presenting the summary, ask: "Would you like me to address any of these comments?"
For each comment to address:
- •Read the relevant file
- •Understand the requested change
- •Implement the change
- •Show the diff
- •Ask for confirmation before moving to next comment
6. Resolve Conversations
After all comments have been addressed (code changes made and confirmed), resolve the Greptile review threads on GitHub:
bun run pr-comments -- --resolve <PR_NUMBER>
This clicks "Resolve conversation" on all Greptile threads via the GitHub GraphQL API.