GH-PR-VIEW(1)

πŸ’… GH-PR-VIEW(1) β€” the gh pr view glow-up

okay so bestie, welcome to the gh-pr-view page from the GitHub CLI manual β€” this is the one where you peek at a pull request and see literally everything about it. main character energy fr fr πŸŽ€


✨ NAME ✨

gh-pr-view β€” view a pull request πŸ‘€


πŸ¦‹ SYNOPSIS πŸ¦‹

gh pr view [<number> | <url> | <branch>] [flags]

🌸 DESCRIPTION 🌸

So what does it do? It displays the title, body, and other information about a pull request. That's it, that's the vibe πŸ’–

Without an argument, the pull request that belongs to the current branch is displayed β€” no cap, it just knows which one you mean 🧚

With the --web flag, open the pull request in a web browser instead. icon behavior honestly 🌈


πŸ’… OPTIONS πŸ’…

  • -c, --comments β€” view pull request comments πŸ’¬ (yes, the whole chaotic comment thread)
  • -q, --jq <expression> β€” filter JSON output using a jq expression ✨
  • --json <fields> β€” output JSON with the specified fields πŸ“
  • -t, --template <string> β€” format JSON output using a Go template; see gh help formatting πŸŽ€
  • -w, --web β€” open a pull request in the browser 🌐

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format 🫢

πŸ”₯ JSON FIELDS πŸ”₯

the way that --json gives you SO many fields to pick from, it's giving full menu at a boba shop 😭 here they all are, exactly, no skips:

additions, assignees, author, autoMergeRequest, baseRefName, baseRefOid, body, changedFiles, closed, closedAt, closingIssuesReferences, comments, commits, createdAt, deletions, files, fullDatabaseId, headRefName, headRefOid, headRepository, headRepositoryOwner, id, isCrossRepository, isDraft, labels, latestReviews, maintainerCanModify, mergeCommit, mergeStateStatus, mergeable, mergedAt, mergedBy, milestone, number, potentialMergeCommit, projectCards, projectItems, reactionGroups, reviewDecision, reviewRequests, reviews, state, statusCheckRollup, title, updatedAt, url


πŸ’€ EXIT CODES πŸ’€

vibe check on how it went πŸ‘‡

  • 0: Successful execution βœ…
  • 1: Error πŸ™ˆ
  • 2: Command canceled 🚫
  • 4: Authentication required πŸ”
⚠️ NOTE: specific commands may have additional exit codes. Refer to the command's help for more information β€” don't come for me if there's more, check the help fr fr.

🌟 SEE ALSO 🌟

  • gh-pr(1) β€” the rest of the pr squad πŸ’œ

and that's the whole page bestie, you ate πŸ“ this was GH-PR-VIEW(1) from the GitHub CLI manual, shipped as GitHub CLI v2.102.0, dated Oct 2026 β€” mwah, periodt πŸ’‹

πŸ“¦ where this page comes from