Since v2.16.0, GitHub CLI officially supports making a pull request draft.
gh pr ready 123 --undo
While the command syntax is different, it would be better using the builtin function, so I archive this repository.
Converts a pull request to draft.
gh extension install kyanny/gh-pr-draft
With a pull request number:
gh pr-draft 1234
Without a pull request number:
gh pr checkout 1234
gh pr-draft
To convert your pull request ready for review, you can use gh pr ready
.
There is was a feature request for the GitHub CLI but I can't couldn't wait it so that I created this script as a GitHub CLI extension.