gh pr ready: Mark a Pull Request Ready
gh pr ready flips a draft pull request to ready for review, or back to draft with --undo.
Automation often opens a draft PR, waits for generated content or checks, then promotes it. gh pr ready is the promote step.
What it does
gh pr ready marks a draft pull request as ready for review, which triggers required reviewers and review-gated checks. With --undo it converts a ready PR back to draft.
Common usage
gh pr ready 123
gh pr ready 123 --undo
gh pr ready -R owner/repo 123Flags
| Flag | What it does |
|---|---|
| --undo | Convert the pull request back to a draft |
| -R, --repo <owner/repo> | Target a specific repository |
In CI
Set GH_TOKEN and add permissions: { pull-requests: write }. Note GITHUB_TOKEN cannot create or convert PRs in a way that triggers other workflows; if you need the ready event to start downstream workflows, use a PAT or a GitHub App token instead of the default token.
Common errors in CI
"GraphQL: Resource not accessible by integration" means the token lacks pull-requests: write or the action is on a fork without write access. "could not determine base repository" means no PR context; pass the number and -R. Converting an already-ready PR without --undo is a no-op, not an error.