gh pr view

View a pull request in the browser


View a pull request specified by the argument in the browser.

Without an argument, the pull request that belongs to the current branch is opened.

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


  -p, --preview   Display preview of pull request content

Options inherited from parent commands

      --help              Show help for command
  -R, --repo OWNER/REPO   Select another repository using the OWNER/REPO format

Examples in use

In the browser

Quickly open a pull request or issue in the browser.

# Viewing a pull request in the browser
~/Projects/my-project$ gh pr view 21
Opening in your browser.

In terminal

Use --preview or -p to view a preview of the title and body.

# Viewing a pull request in terminal
~/Projects/my-project$ gh pr view 21 --preview
Hide PR number badges on branches that have an upstream PR
opened by user. 0 comments. (enhancement)

  While we're in a state where we're not displaying upstream pull requests in the PR list, we should
  hide the `#XX` badge to avoid confusion.

View this pull request on GitHub: