Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 1

Get overall pull request review status OR re-request time via v4

The problem I am trying to solve is to determine the overall status of a review on a pull request. What I mean by this is emulating the "Approved" or "Changes requested" status that shows up in /pulls. I know that currently you can see who has been requested to review a PR and you can see the reviews left on the PR, but that isn't sufficient to recreate the state. In particular, if someone requests changes and then is re-requested to review the PR, the overall state of the PR changes from "Changes requested" to awaiting review. This is shown in the per-user review status on the top right of a PR, where the icon next to the rewiever's name changes from a red "changes requested" icon to a yellow "awaiting rewiew".

 

The closest I've found for exposing this information is to use the search API and see if the PR in question matches the review:changes_requested or review:approved filters, but this requires doing two to three searches (depending on if you're using other search terms).

 

My question is: Is it possible to determine the ground truth review state of a PR as a whole via the API, or, barring that, is it possible to get the times at which someone was (re)requested for a review (to manually re-create the overall review state)?