Skip to content
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

Allow merging PRs with pending checks #312

Open
erickmendonca opened this issue Jun 25, 2019 · 14 comments
Open

Allow merging PRs with pending checks #312

erickmendonca opened this issue Jun 25, 2019 · 14 comments

Comments

@erickmendonca
Copy link
Contributor

Hi,

Some repositories might have checks that never complete, e.g. CD checks that need authorization or new CI checks under testing.

I wrote some code to restrict the blockingChecks condition to only look for required checks in branch protection rules depending on a setting you can define in auto-merge.yml.

Would this be something we could add to probot-auto-merge?

@bobvanderlinden
Copy link
Owner

I missed this PR. But yes, I think this is certainly a good option. How do you do the configuration for this feature?

@erickmendonca
Copy link
Contributor Author

I added a setting called something like “waitForBlockingChecksOnly” on auto-merge.yml. It’s working well. I’ll repackage it into a PR.

@bobvanderlinden
Copy link
Owner

bobvanderlinden commented Oct 27, 2019

Maybe we should have something like:

blockingChecks: all
blockingChecks: required
blockingChecks: none

blockingChecks: all is default, as that's the current behavior. I can imagine making it possible to specify the blocking checks for auto-merging specifically, but that's probably out of scope for this issue.

@danijeljw
Copy link

Has this been added yet? I just found out the hard way that my checks don't complete before the merge takes place and checks weren't validated on a merged branch 👎

@Tapchicoma
Copy link

@erickmendonca could you share code you've wrote? Having same issue that for some PRs some non-required checks may never finish

@erickmendonca
Copy link
Contributor Author

@erickmendonca could you share code you've wrote? Having same issue that for some PRs some non-required checks may never finish

I am not sure if this is compatible with the current version of the tool, but this is what I did on my instance.

@rogerluan
Copy link
Contributor

rogerluan commented Aug 7, 2020

Maybe we should have something like:

blockingChecks: all
blockingChecks: required
blockingChecks: none

blockingChecks: all is default, as that's the current behavior. I can imagine making it possible to specify the blocking checks for auto-merging specifically, but that's probably out of scope for this issue.

I concluded, by testing, that the default is probably just the equivalent to blockingChecks: required, not all. Hope this helps someone, because this message led me to think there was an issue with my branch protection rules, while there wasn't 🙈 For more info on the issue I was having: #805

@sebastiankirsch
Copy link

@rogerluan My experience is that the default is indeed blockingChecks: all, since auto-merge doesn't merge a PR where required checks (as defined by a branch protection rule) are successful; yet other, irrelevant checks fail.
I'm no JS/TS expert, but https://github.com/bobvanderlinden/probot-auto-merge/blob/master/src/conditions/blockingChecks.ts gives the impression that all checks are considered.

@sebastiankirsch
Copy link

Maybe we should have something like:

blockingChecks: all
blockingChecks: required
blockingChecks: none

blockingChecks: all is default, as that's the current behavior. I can imagine making it possible to specify the blocking checks for auto-merging specifically, but that's probably out of scope for this issue.

@bobvanderlinden Seems to me that with requiredChecks in place, the required option is, well, not required, and thus a simple true/false configuration would be sufficient?

@rogerluan
Copy link
Contributor

auto-merge doesn't merge a PR where required checks (as defined by a branch protection rule) are successful; yet other, irrelevant checks fail.

Yup, that's correct, and matches GitHub behavior. However, there's not only "success" and "failure" states - there's also "pending" (or inconclusive, or waiting to be reported etc). If it passes all required checks, and the other checks are NOT failed, it will merge. :)

@Borda
Copy link

Borda commented Dec 15, 2020

@bobvanderlinden Seems to me that with requiredChecks in place, the required option is, well, not required, and thus a simple true/false configuration would be sufficient?

hello, is there a description for this requiredChecks I cannot find it in the readme...

@rogerluan
Copy link
Contributor

hello, is there a description for this requiredChecks I cannot find it in the readme...

Seems like it's not documented 😬

@bobvanderlinden
Copy link
Owner

@Borda @rogerluan If you're referring to #312 (comment), that's hypothetical. It doesn't have an implementation (yet). requiredChecks itself is one of the conditions, but doesn't need any configuration atm.

@Borda
Copy link

Borda commented Dec 15, 2020

@Borda @rogerluan If you're referring to #312 (comment), that's hypothetical. It doesn't have an implementation (yet). requiredChecks itself is one of the conditions, but doesn't need any configuration atm.

so is there a way-around ho to trigger only if all (or some named ones) pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants