automergeStrategy not applied when using platformAutomerge on GitHub
#41177
rcdailey
started this conversation in
Suggest an Idea
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When
platformAutomerge: true(the default) andautomergeStrategy: "rebase"are configured, GitHub platform automerge still uses the repo-level default merge method (typically squash) instead of rebase.This is a follow-up to #16884, which was closed as resolved in v37.110.0. That fix wired
automergeStrategyinto themergePrcode path (Renovate-native merge), but thetryPrAutomerge/enableAutoMergecode path (used whenplatformAutomerge: true) was not updated.Code
In
lib/modules/platform/github/index.ts(line 1789),tryPrAutomergeuses onlyconfig.mergeMethod(auto-detected from repo settings) and ignores theautomergeStrategythat is already available viaplatformPrOptions:By contrast,
mergePr(line 1958) correctly consults the strategy:The
PlatformPrOptionsinterface already carriesautomergeStrategy(types.tsline 103), and it is already passed intotryPrAutomerge(line 1761), but never read.Suggested Fix
I'm happy to submit a PR for this if the approach looks correct.
Beta Was this translation helpful? Give feedback.
All reactions