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
- Verify auth:
gh --version gh auth status - View PR summary:
gh pr view 123 - View comments or JSON:
gh pr view 123 --comments gh pr view 123 --json title,state,reviewDecision --jq '.title' - Optional web view:
gh pr view 123 --web
Examples
# Get review decision via JSON
~ gh pr view 123 --json reviewDecision --jq '.reviewDecision'
Notes
--templatesupports Go templates; seegh help formatting.
References
- GitHub CLI manual: https://cli.github.com/manual/
gh pr view --help