Claude-skill-registry github-pr-workflow
Working with GitHub Pull Requests using the gh CLI. Use for fetching PR details, review comments, CI status, and understanding the difference between PR-level comments vs inline code review comments.
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/github-pr-workflow" ~/.claude/skills/majiayu000-claude-skill-registry-github-pr-workflow && rm -rf "$T"
manifest:
skills/data/github-pr-workflow/SKILL.mdsource content
GitHub PR Workflow
Key Concepts
Comment Types
GitHub PRs have two different types of comments:
- PR-level comments - General discussion on the PR (shown via
)gh pr view --comments - Inline code review comments - Comments attached to specific lines of code (requires API)
Important:
gh pr view --comments does NOT show inline code review comments!
Scripts
| Script | Purpose |
|---|---|
| Get inline code review comments (the ones misses!) |
| PR title, description, state, branches |
| Review decisions (approved/changes requested) |
| CI check status |
All scripts auto-detect the repo from git remote, or accept
[REPO] as second arg.
Common Commands
# Basic PR info gh pr view <PR> # Overview gh pr view <PR> --comments # PR-level comments only (NOT inline!) gh pr diff <PR> # View the diff # Review comments (inline) - USE THE SCRIPT gh-pr-review-comments <PR> # ✅ Gets inline code review comments # Or manually via API gh api repos/OWNER/REPO/pulls/PR/comments | jq '.[] | {path, line, body}' # Reviews (approve/request changes) gh pr review <PR> --approve gh pr review <PR> --request-changes --body "Please fix X" gh pr review <PR> --comment --body "Looks good overall" # Checks gh pr checks <PR> # CI status gh run view <RUN_ID> --log-failed # Failed job logs
API Endpoints Reference
When
gh commands don't expose what you need, use the API:
# Inline review comments gh api repos/OWNER/REPO/pulls/PR/comments # PR-level comments (issue comments) gh api repos/OWNER/REPO/issues/PR/comments # Review submissions gh api repos/OWNER/REPO/pulls/PR/reviews # Commits in PR gh api repos/OWNER/REPO/pulls/PR/commits # Files changed gh api repos/OWNER/REPO/pulls/PR/files
Workflow: Addressing Review Comments
- Get the comments:
gh-pr-review-comments <PR> - Make fixes in your local branch
- Push (if using JJ:
)jj git push - Reply to comments on GitHub or via API
- Re-request review if needed:
gh pr edit <PR> --add-reviewer <USER>