Repository navigation
feat: add merge.strategy, replacing the deprecated automerge field - #254
Merged
Merged
Conversation
Updatecli deprecated the "automerge" action field in favour of "merge.strategy", and warns once per pipeline when a manifest still carries it. Every policy rendering an action triggered that warning, including with the "automerge: false" the policies ship by default. The values interface is unchanged: "automerge" still drives the rendered strategy, so existing values files keep working. Signed-off-by: Loïs Postula <lois@postu.la>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Rendering a fixed strategy only moved users from one hardcoded behaviour to another, and left the "client" strategy and its delay out of reach from a policy. "merge.strategy" now drives the rendered strategy and falls back to "automerge" when unset, so existing values files keep working. The version bump is a minor one, the values interface grew. Signed-off-by: Loïs Postula <lois@postu.la>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #253
Updatecli deprecated the
automergefield of thegithub/pullrequestaction in favour ofmerge.strategy, and warns once per pipeline when a manifest still carries it, including with theautomerge: falsethese policies ship by default. An organisation wide run printed that warning 1274 times in a single job.Every
_scm.*.yamltemplate now renders:merge.strategyis a new value, andautomergestays as the fallback, so no existing values file has to change. This also puts theclientstrategy and itsafterdelay within reach of a policy, which the hardcodedautomergenever allowed.Precedence, verified with
updatecli manifest show:strategy: manualautomerge: truestrategy: automerge: {strategy: client, after: 48h}strategy: client,after: 48hautomerge: trueandmerge.strategy: manualstrategy: manualafterrenders only when set, so the core default of 24h for theclientstrategy still applies.75 templates over 38 policies, scaffolds included, each with a minor
versionbump, itsCHANGELOG.mdentry, themergedefaults invalues.yamland the two values documented inREADME.md.updatecli/updatecli.d/policies.yaml, which carriesautomerge: truefor this repository's own pipeline, is migrated too.Test
make test39 policies pass the validation.
Additional Information
Tradeoff
merge.strategyhas to exist in everyvalues.yaml, otherwise the template fails on a missing key, so the defaults carry an emptymerge.strategyandmerge.after. The alternative, guarding each access, costs a longer template line in 75 files.