-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only update branch once approval was given #181
Comments
I'm considering contributing this feature. I'm trying to figure out how to use the GitHub API via I also don't see anything under the Pull Reviews API that summarizes the state of approvals across the PR. We could check that the PR has approvals and none are |
This Stack Overflow post seems related but doesn't seem to offer a complete solution for this use case. |
Bulldozer should have permission to read branch protection details. The way I'd initially approach this is using the get pull request review protection API to get the approval conditions, then use the endpoint to list reviews to see if there are approving reviews that satisfy the conditions. Unfortunately, I don't think this provides a way to test for required code owner reviews, unless there's an API to get the code owners for the files changed in the PR. We might have to accept that this feature would not fully implement the same conditions as GitHub. |
Do we think PullRequestReviewDecision from the I'm also happy to make a discussion / post on the appropriate GitHub feedback repo to get some additional ideas on this one. |
Another possibility, from this Stack Overflow answer, would be to simply check if the PR merge state is If this field takes into account both required reviews and statuses (need to confirm), it might be possible to implement both this feature request and #259 in a single check and config option? Edit: we would still need custom logic if we wanted to check specific statuses are passing vs the ones required in branch protections. |
The There are also some other cases where Bulldozer optimistically attempts a merge and handles any error. Having accurate blocking information could avoid this too. One complication might be the difference between the This would be the first use of the GraphQL API in Bulldozer, but I don't think that's a problem. The main change for users is that they must also specify the |
Looks like that field is also in beta and subject to change, so not sure the appetite to use that field before that part of the API stabilized.
|
Please add a configurable option to only update a PR branch once reviewers have approved (if approval is required on this branch)
This would help to reduce the number of useless builds triggered by updating the branch frequently (see
#145 (comment) last section).
Readme suggests bulldozer to be useful if you "Have a lot of active development", but actually here it is making the build machines running hot.
Another good way to taggle this problem would be to implement #128
The text was updated successfully, but these errors were encountered: