Gh Pr View

View GitHub pull request details, checks, and JSON fields using gh CLI.

dceoy e2e2fe6 996 B Updated

File contents

GitHub PR View

When to use

  • The user asks to inspect a PR, its checks, or reviews.

Inputs to confirm

  • PR number/URL/branch (or use current branch PR).
  • Whether to show comments or JSON output.
  • Target repo if not current (--repo OWNER/REPO).

Workflow

  1. Verify auth:
    gh --version
    gh auth status
    
  2. View PR summary:
    gh pr view 123
    
  3. View comments or JSON:
    gh pr view 123 --comments
    gh pr view 123 --json title,state,reviewDecision --jq '.title'
    
  4. Optional web view:
    gh pr view 123 --web
    

Examples

# Get review decision via JSON
~ gh pr view 123 --json reviewDecision --jq '.reviewDecision'

Notes

  • --template supports Go templates; see gh help formatting.

References

dceoy/github-cli-agent-skills/tree/main/skills/gh-pr-view commit e2e2fe6f38

Frequently asked questions

npx skillmds@latest add dceoy/gh-pr-view