GitHub API: search for PRs from author with enough approvals to merge

I want to search for PRs from a specified author which are ready to merge. In our case that would be 2 approvals. Is there a simple way to use the API to query for pull requests which a specific user created and which have 2 approvals and no rejections?

Hi @teresap,

Thank you for being here! Currently do not provide an overall review approval status for a Pull Request. WE do have an open feature request for this and I’ll add your use case to the issue. 

However, The list reviews on a pull request endpoint will show you all of the reviews on a pull request with the standard 5000 requests per hour limit. Looping through the output looking for "state": "APPROVED" will show whether the pull request was approved or not. Perhaps that could help?

1 Like