Using the GitHub API, I can't seem to detect if a pull request is in "Review required" status (as setup from https://docs.github.com/en/github/administering-a-repository/enabling-required-reviews-for-pull-requests).
It's not listed in the PR description in https://api.github.com/repos/my_company/my_project/pulls
and the status list from https://api.github.com/repos/my_company/my_project/statuses/abc123
only shows TravisCI statuses.
Since no review has happened, the comments from https://api.github.com/repos/my_company/my_project/pulls/123/comments
are also empty (as expected, I just checked it to see if it also had review status).
So, is there an API call I'm missing that'll clearly indicate if a PR is in "Review required" status?
Nov. 2016: No there does not seem to be a direct API.
You can see all the future API evolution in API Previews, and again there is nothing regarding reviews.
That would be a feature request for GitHub support.
Update January 2017, as mentioned by the OP celadonz in the comments, listing reviews on PR is in beta.
2020: Since then, as commented by Benjamin W., the official documentation is rest/reference/pulls#reviews
, and it is indeed out of beta.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With