Loading...
Loading...
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.
npx skill4agent add ypares/agent-skills github-pr-workflowgh pr view --commentsgh pr view --comments| Script | Purpose |
|---|---|
| Comprehensive PR info: summary, CI checks and unresolved review and inline comments |
[REPO]owner/repo# Get complete PR info with UNRESOLVED comments only
gh-pr-info <PR> [REPO] # ✅ Everything you need: summary, checks, reviews, unresolved comments
# Basic PR info (native gh commands)
gh pr view <PR> # Overview
gh pr view <PR> --comments # PR-level comments only (NOT inline!)
gh pr diff <PR> # View the diff
# 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 logsgh# 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/filesgh-pr-info <PR>