Skip to content

feat: add merge.strategy, replacing the deprecated automerge field - #254

Merged
olblak merged 2 commits into
updatecli:mainfrom
loispostula:fix/merge-strategy
Oct 23, 2026
Merged

olblak merged 2 commits into
updatecli:mainfrom
loispostula:fix/merge-strategy

Conversation

@loispostula

@loispostula loispostula commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix #253

Updatecli deprecated the automerge field of the github/pullrequest action in favour of merge.strategy, and warns once per pipeline when a manifest still carries it, including with the automerge: false these policies ship by default. An organisation wide run printed that warning 1274 times in a single job.

Every _scm.*.yaml template now renders:

    spec:
      merge:
        strategy: '{{ if .merge.strategy }}{{ .merge.strategy }}{{ else if .automerge }}auto{{ else }}manual{{ end }}'
        # {{ if .merge.after }}
        after: '{{ .merge.after }}'
        # {{ end }}

merge.strategy is a new value, and automerge stays as the fallback, so no existing values file has to change. This also puts the client strategy and its after delay within reach of a policy, which the hardcoded automerge never allowed.

Precedence, verified with updatecli manifest show:

values rendered
defaults strategy: manual
automerge: true strategy: auto
merge: {strategy: client, after: 48h} strategy: client, after: 48h
automerge: true and merge.strategy: manual strategy: manual

after renders only when set, so the core default of 24h for the client strategy still applies.

75 templates over 38 policies, scaffolds included, each with a minor version bump, its CHANGELOG.md entry, the merge defaults in values.yaml and the two values documented in README.md. updatecli/updatecli.d/policies.yaml, which carries automerge: true for this repository's own pipeline, is migrated too.

Test

make test

39 policies pass the validation.

Additional Information

Tradeoff

merge.strategy has to exist in every values.yaml, otherwise the template fails on a missing key, so the defaults carry an empty merge.strategy and merge.after. The alternative, guarding each access, costs a longer template line in 75 files.

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>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04074749-ee77-49b0-9e3c-d48ec7a80f6d
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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>
@loispostula loispostula changed the title fix: replace the deprecated automerge field with merge.strategy feat: add merge.strategy, replacing the deprecated automerge field Oct 23, 2026
@olblak
olblak merged commit 49c8789 into updatecli:main Oct 23, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

Policies render the deprecated automerge action field

2 participants