Claude-skill-registry gh-get-review-comments
Retrieve all review comments from a pull request using the GitHub API. Use when you need to see what feedback has been provided on a PR.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/gh-get-review-comments" ~/.claude/skills/majiayu000-claude-skill-registry-gh-get-review-comments && rm -rf "$T"
manifest:
skills/data/gh-get-review-comments/SKILL.mdsource content
Get PR Review Comments
Retrieve and analyze all review comments from a pull request.
When to Use
- Checking for unresolved review feedback
- Analyzing reviewer feedback before fixing
- Verifying all comments have been addressed
- Getting comment IDs for replies
Quick Reference
# Get all review comments gh api repos/OWNER/REPO/pulls/PR/comments # Get comments with formatting gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | {id: .id, path: .path, body: .body}' # Filter by reviewer gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | select(.user.login == "username")' # Get only unresolved comments gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | select(.in_reply_to_id == null)'
Workflow
- Fetch comments: Use API to list all comments
- Parse output: Extract IDs and feedback
- Analyze feedback: Understand what needs fixing
- Plan fixes: Decide how to address each comment
- Apply fixes: Make the requested changes
Output Format
Comments include:
- Comment ID (use for replies)id
- File where comment was madepath
- Line number of commentline
- Comment textbody
- Reviewer usernameuser
- Parent comment ID (null if top-level)in_reply_to_id
Error Handling
| Problem | Solution |
|---|---|
| PR not found | Verify PR number |
| Auth failure | Check |
| No comments | API returns empty array (not an error) |
| Permission denied | Check authentication scopes |
Filtering Examples
Comments on specific file:
gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | select(.path == "src/file.mojo")'
Comments by specific reviewer:
gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | select(.user.login == "reviewer")'
Only top-level comments (not replies):
gh api repos/OWNER/REPO/pulls/PR/comments \ --jq '.[] | select(.in_reply_to_id == null)'
References
- See gh-reply-review-comment skill for replying to comments
- See gh-fix-pr-feedback skill for workflow to address feedback
- GitHub API docs: https://docs.github.com/en/rest/pulls/comments