Mark pull request as ready to review

Viewed 1163

Draft pull requests have been available for over a year now on Github. The REST API documentation shows how to create a pull request in draft state, but not how to mark it as ready to review.

An issue on hub suggests this might work:

hub api -H 'accept: application/vnd.github.shadow-cat-preview+json' \
  -XPATCH repos/{owner}/{repo}/pulls/NUMBER -F draft=false

However, it did nothing when I tested it.

How can I do this through the API?

1 Answers

The only API which does take "draft" as an input parameter is the "Create a PR" one (as illustrated by hub issue 2038).

The "Update a PR" API has no draft parameter, which would explain why the API call did not change/updated the PR.
From what I can see, this is not yet possible through the GitHub API.

The is a GraphQL API v4 call though: "markPullRequestReadyForReview"

Plus, from this Go wrapper issue, don't forget to set the header to "application/vnd.github.shadow-cat-preview+json".

Related