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

Match all merge triggers instead of any #225

Open
philBrown opened this issue Mar 10, 2021 · 2 comments
Open

Match all merge triggers instead of any #225

philBrown opened this issue Mar 10, 2021 · 2 comments

Comments

@philBrown
Copy link

While configuring Bulldozer, I assumed that a PR would need to match all triggers before being automatically merged.

For example, I'm using Bulldozer to auto-merge PRs from Dependabot with the following config

merge:
  trigger:
    labels: ["dependencies"]
    branches: ["main"]
    branch_patterns: ["dependabot/.*"]

however I noticed that Bulldozer is merging other PRs with the following message

my-repo#129 is triggered because triggering is enabled and pull request target is a triggered branch: "main"

This PR had no labels and was not within a dependabot/* branch name.

Is there any way to only trigger when all conditions match?

@philBrown
Copy link
Author

After having a look in https://github.com/palantir/bulldozer/blob/develop/bulldozer/signals.go#L52, I can see that this is simply not possible without significant refactoring 😢

Consider this a wishful feature request

@asvoboda
Copy link
Member

Hey @philBrown,

Thanks for the comment. Usually we suggest pairing bulldozer with policy-bot. Policy-bot can be used to create complex approvals (for allow specific dependabot PRs) which can then be auto merged with Bulldozer.

This is mentioned in the README, but perhaps we should make this a little more visible?

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

2 participants