You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm aware you can already override some settings, like the merge method, by passing them on the automerge label, but would it be possible to have the overrides automatically picked (or apply a different configuration altogether) depending on certain properties of the PR?
The particular case I have in mind looks like this:
If a branch PR is only one commit ahead of the target:
Fast forward the extra commit as it is.
Otherwise:
Merge avoiding fast-forwarding. The merge commit message will be extracted from the PR description.
Would it be too difficult to implement? Is it something you would accept a PR for?
The text was updated successfully, but these errors were encountered:
Hmm, I'm curious what the API would be like in terms of the config settings & labels for the PR to trigger the behavior.
Having labels override more settings is pretty straightforward to implement, would the different config mean there would be multiple kodiak.toml files in a repo? Maybe different sections in the toml file?
Definitely open to it, but it might be easier to do with a github action
Ideally, it'd be great to have something along how cargo deals with configuration overrides, see platform specific dependencies.
In the case of kodiak it could look like this:
['pr_predicate(number_commits>1)'.merge]
method = "merge"message.title = "pull_request_title"# Fallback
[merge]
method = "squash"# message.title already defaults to github_default, # which in the case of squash would be the commit message.# message.title = "github_default"message.include_coauthors = true# will be always true
I wouldn't mess with specifity rules, later matching keys would override earlier declared ones by default. Perhaps you can have special cases where instead of overriding, the second property would be appended, like adding an extra co-author.
In addition to the number of commits, these predicates could be useful too:
Author: i. e. if it's dependabot prioritize merge.
Commit/PR message regex: i. e. if the PR title matches the conventional commit scheme include the PR number in the message.
Time: i. e. during weekends require label "automerge_force".
Separate configuration files could be implemented as file includes, but that would be a different feature, orthogonal to configuration predicates.
I'm aware you can already override some settings, like the merge method, by passing them on the automerge label, but would it be possible to have the overrides automatically picked (or apply a different configuration altogether) depending on certain properties of the PR?
The particular case I have in mind looks like this:
If a branch PR is only one commit ahead of the target:
Fast forward the extra commit as it is.
Otherwise:
Merge avoiding fast-forwarding. The merge commit message will be extracted from the PR description.
Would it be too difficult to implement? Is it something you would accept a PR for?
The text was updated successfully, but these errors were encountered: