gh pr view Show the details of a pull request
Prints a pull request's title, status, description, reviewers and checks in the terminal. With no number it shows the one for your current branch.
Synopsis
gh pr view [NUMBER | URL | BRANCH] [FLAGS]
Common options
| Option or form | What it does |
|---|---|
-w, --web | Open it in the browser |
-c, --comments | Include comments |
--json FIELDS | Output fields as JSON |
-q, --jq EXPR | Filter JSON output |
-R, --repo owner/repo | Look in a different repository |
Examples
gh pr view
Add search #42
Open • octocat wants to merge 3 commits into main from feature/search
gh pr view 42
gh pr view 42 --web
gh pr view 42 --comments
gh pr view 42 --json state --jq .state
Notes
- The number is in the URL of the pull request: .../pull/42.
- Use gh pr diff 42 to see the code changes and gh pr checks 42 for test results.
- Outputs open in a pager. Pipe through cat to avoid it.
See also
Last reviewed 2026-10-09.