Skip to main content

Command referencegh pr review

gh pr review command (Linux & Windows / GitHub CLI)

Linux & WindowsGitHub CLIgitintermediate

What it does

Submit an approve, request-changes, or comment review on a pull request. When people search for gh pr review, they usually want practical GitHub CLI flags, safe examples, and how this subcommand fits everyday PR and repo workflows on Linux, Windows, and macOS. Syntax, options, and copyable examples are below.

Submit an approve, request-changes, or comment review on a pull request.

Syntax

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

Common options

Flag / optionMeaning
-a, --approveSubmit an approving review.
-r, --request-changesSubmit a request-changes review.
-c, --commentSubmit a general comment review.
-b, --bodyReview comment body.

Practical examples

Approve

gh pr review 123 --approve --body "LGTM"

Approves PR 123 with a short note.

Request changes

gh pr review 123 --request-changes --body "Please add tests."

Blocks merge until the author addresses feedback.

Comment only

gh pr review --comment --body "Nit: rename helper."

Leaves a non-blocking review on the current branch PR.

Common mistakes

  • Approving without reading the diff or CI status.
  • Combining multiple of `--approve`, `--request-changes`, and `--comment` incorrectly.

FAQ

What does gh pr review do in GitHub CLI?

Submit an approve, request-changes, or comment review on a pull request.

Does gh pr review work on Windows and Linux?

Yes. The GitHub CLI (`gh`) runs on Linux, Windows, and macOS with the same subcommand syntax after you authenticate with `gh auth login`.

What is a practical gh pr review example?

Try `gh pr review 123 --approve --body "LGTM"` — Approves PR 123 with a short note.

Do I need a token in the command line for gh pr review?

Prefer `gh auth login` so credentials stay in the system keyring or secure storage. Avoid pasting personal access tokens into shell history.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.