-
Notifications
You must be signed in to change notification settings - Fork 64
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
Use different merge methods for different labels #764
Comments
Same question here. Documentation for rules is not clear - from examples it looks you can only make multiple options and if any of them is satisfied, it's merged (OR). Can you combine some rules with OR and some with AND? |
I've ended up using second instance of bot for merge commits additionally to the squash ones 😒 |
I'm thinking of workaround of using the bot only for pull requests ("merge" label) and merging manually for releases ("merge-release" label) |
You can't do this out-of-the-box. I've added an implementation of this in a local fork but haven't had time to propose a PR back for it yet. What we've done: We've added a So we have something like:
in our configuration. i.e. in order to merge you must supply either I could probably get a PR together if there's interest? |
It would be nicer if you could place Example: rules:
- requiredLabels:
- autosquash
mergeMethod: squash
- requiredLabels:
- autorebase
mergeMethod: rebase
# ... global merge conditions
mergeMethod: merge The same pattern can be used for What do you think? I agree that the rules are not always clear, but I think that's mostly a documentation issue. Any suggestions are welcome. Basically: Global conditions need to be met AND conditions of any of the rules need to be met. |
@bobvanderlinden Yes, that's really nice, and, as you say, it extends to all condition types so is much more flexible. I'll get something together. |
The code gets a little messy with the combination of conditions and config at the same level. I can either take the rule object (consisting of conditions plus bits of config) and filter it down to only the configurable portions (e.g.
Do you have a preference, @bobvanderlinden? |
Any progress on this? |
Hi, maybe I don't fully understand rules section, but is it possible to configure app following way:
The text was updated successfully, but these errors were encountered: