LinuxCommandLibrary

gh-pr-view

Display pull request details and metadata

TLDR

View current PR

$ gh pr view
copy
View specific PR
$ gh pr view [pr-number]
copy
Open PR in browser
$ gh pr view --web
copy
View as JSON
$ gh pr view --json [title,body,state]
copy
View PR comments
$ gh pr view --comments
copy

SYNOPSIS

gh pr view [pr-number] [options]

DESCRIPTION

gh pr view displays detailed information about a pull request including title, body, state, reviewers, labels, and merge status. It renders markdown content in the terminal.
The command defaults to the pull request for the current branch if no number is specified. JSON output enables scripted access to PR data with optional jq filtering.

PARAMETERS

PR-NUMBER

Pull request number (defaults to current branch).
--web
Open in browser instead of terminal.
--comments
Show PR comments.
--json FIELDS
Output specific fields as JSON.
-q QUERY, --jq QUERY
Filter JSON output with jq syntax.
--help
Display help information.

CAVEATS

Markdown rendering is simplified for terminal. Large PRs may be truncated. JSON fields vary by PR state.

HISTORY

gh pr view is part of GitHub CLI's pull request commands, providing terminal-based PR inspection as an alternative to the web interface.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community