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

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?
1 Reply
Community Manager
Message 2 of 2

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

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?


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!