Home / Alt manpages / gh-pr-ready(1)

  • gh-pr-ready(1)
  • User command
  • linux

Mark a Draft Pull Request Ready with gh pr ready

Use gh pr ready to flip a draft pull request to ready for review, then prove GitHub agrees. Allow about five minutes. You will also learn how to put it back into draft if the review boundary moves.

  • You need: GitHub CLI, a repository with a pull request, and an authenticated account that can update that pull request.
  • Version oddity. The executable on the checked machine reports GitHub CLI 2.87.3, but the package database reports gh version 2.45.0-1ubuntu0.3+esm3. The binary and package metadata do not describe the same release.
  • Manual date. The local manual is dated March 2026. On another host, check gh pr ready --help before relying on version-specific details.

1. Check the command and your account

Start with read-only checks. They need no elevated privileges and change nothing in the repository or pull request:

$ command -v gh
/usr/bin/gh
$ gh pr ready --help
Mark a pull request as ready for review.

USAGE
  gh pr ready [<number> | <url> | <branch>] [flags]

Confirm that the account and host you intend to use are active:

$ gh auth status --active

The output is host-specific. If it reports an authentication problem, stop and repair authentication through your normal GitHub CLI process.

Warning

Do not use --show-token in a shared terminal or paste its output into a ticket. That option displays credentials.

2. Identify the pull request without changing it

gh pr ready accepts a pull request number, URL or branch name. With no argument, it uses the pull request for the current branch. An explicit number is easier to audit in a script or a shared session:

$ gh pr view 123 --json number,title,isDraft,headRefName,baseRefName
{"baseRefName":"main","headRefName":"update-docs","isDraft":true,"number":123,"title":"Update deployment notes"}

Replace 123 with the real number. The JSON above is an example shape, not a prediction. The useful field is isDraft. If it is already false, the pull request is ready for review and there is no reason to repeat the state-changing command.

For a repository other than the one selected by your current directory, add it in [HOST/]OWNER/REPO form to both the inspection and update commands:

$ gh pr view 123 --repo OWNER/REPO --json number,title,isDraft

Tip

Git remotes can be SSH or HTTPS as normal, but do not pass a full Git remote URL to --repo. The inherited option expects the host, owner and repository form shown above.

3. Mark the pull request ready

This is the state-changing step. It is an ordinary user command, not an administrative one, so sudo is neither needed nor appropriate.

Warning

Before you run it, check that the pull request gives reviewers enough context and that you really want to drop its draft status. Marking it ready can put it in review queues and notify people, depending on repository settings.

$ gh pr ready 123

The command should exit with status zero and normally prints a confirmation. The wording varies with the CLI version and host. It changes the draft state on GitHub, not your local branch, working tree or commits.

To target a pull request in a different repository:

$ gh pr ready 123 --repo OWNER/REPO

You can also pass a pull request URL or a branch name when that identifies the right pull request. A branch name can be ambiguous when several remotes or repositories are involved, so prefer the number or URL when you need a clear audit trail.

4. Verify the new state

A line of terminal output is not your only check. Ask GitHub for the current state:

$ gh pr view 123 --json isDraft --jq .isDraft
false

false means the pull request is no longer a draft. If the command fails, read the error and repeat the read-only view. The usual causes:

  • Invalid number. The pull request does not exist under that number.
  • Wrong repository. The current directory or --repo points somewhere else.
  • Authentication failure. The host-specific login is invalid.
  • No permission. The account cannot update the pull request.

A successful local command is not proof that the intended pull request was selected. That is why the number, title and branch check in the previous step matters.

5. Put it back into draft when needed

Making a pull request ready is reversible while the host and repository plan support the operation. If new work means reviewers should wait, use --undo:

$ gh pr ready 123 --undo
$ gh pr view 123 --json isDraft --jq .isDraft
true

The manual describes --undo as converting the pull request to draft. It is still a remote state change, so verify the number or URL before you run it.

Recovery

If the command says your plan does not support the conversion, leave the pull request alone and use the repository's normal GitHub interface or project workflow. Do not try a local branch operation instead: deleting or resetting a branch does not restore draft status.

6. Diagnose the common traps

With no argument, the command follows the current branch. If that branch has no pull request, or could match more than one across repositories, select a number or URL explicitly. Check the directory and branch before retrying:

$ git branch --show-current
$ git remote -v
$ gh pr view 123 --json number,url,isDraft

A pull request that is already ready may not need another update. One that is closed or merged is not an ordinary open review candidate. View its state before chasing a surprising result:

$ gh pr view 123 --json state,isDraft,url

Warning

Keep failures separate from permission changes. Do not run the command as root, expose an authentication token, or grant a broader repository role just because the update was rejected. Confirm the host, repository, number and active account first, then ask the repository maintainer if your account is not allowed to change draft status.

Done means

  • Right pull request. It was identified by number, URL or a checked current branch.
  • No sudo. gh pr ready completed without it and returned success.
  • State verified. gh pr view ... --json isDraft --jq .isDraft reports false.
  • Reviewers prepared. They have the context they need before the pull request is exposed as ready.
  • Reversal ready. If you needed gh pr ready ... --undo, you used it only after rechecking the target and verified it with isDraft.