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

Check if PR requires more reviews

Is there a way to check if a pr requires more reviews in order to be merged without having to make a request for branch protection requirements for reviews and then another request for the reviews on the PR?

1 Reply
Pilot Lvl 1
Message 2 of 2

Re: Check if PR requires more reviews

@kevo1ution 

 

By just calling the pull request API. It has a `mergeable` attribute and `mergeable_state` using this you can find whether the pull request is mergeable or not. If `mergeable` is true and `mergeable_state` is clean then it is ready to merge.

 

https://developer.github.com/v3/pulls/#get-a-single-pull-request