Restore default GitHub merge commit messages for MERGE platform automerge #44656
lo1tuma
started this conversation in
Suggest an Idea
Replies: 1 comment
|
Thanks for the detailed write-up, this is a real regression. The problem lies here: // lib/modules/platform/github/index.ts
if (mergeMethod !== 'REBASE' && automergeCommitMessage) {
// ...builds commitHeadline / commitBody
}Passing So Option 1 is the right fix i.e. scope the override to SQUASH only: if (mergeMethod === 'SQUASH' && automergeCommitMessage) {I'd skip Options 2/3. A dedicated config option can be added if a genuine need for per-strategy message control shows up later, that can be a separate feature. |
0 replies
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.
Renovate
43.177.5changed GitHub platform automerge to passcommitHeadlineandcommitBodytoenablePullRequestAutoMerge:#42056
That makes sense for
SQUASH, where GitHub can otherwise use the full PR body as the squash commit body. But forMERGE, this changed the merge commit title from GitHub’s default:to the Renovate commit message:
This is effectively a breaking change for tools that rely on GitHub’s normal merge commit format. I use
pr-log, a changelog generator based on GitHub pull requests, and it relied on the previous merge commit shape.It also makes
MERGEhistory noisier. For example, a history can now look like this:The
left-padmerge commit and its child commit have almost identical messages, while the regular merge commit still has GitHub’s normalMerge pull request ...title.Possible fixes:
Limit the change from fix(github): set commit message explicitly for platform automerge #42056 to
SQUASH.This would keep the original fix where it is needed, while restoring the previous
MERGEbehavior.Add a single config option for platform automerge commit messages.
Example:
{ "platformAutomergeCommitMessage": "auto" }Possible values:
Suggested behavior:
Add fine-grained strategy-specific control.
Example:
{ "platformAutomergeCommitMessage": { "merge-commit": "platform-default", "squash": "commit-message", "rebase": "platform-default" } }A future extension could allow an explicit format:
{ "platformAutomergeCommitMessage": { "merge-commit": "platform-default", "squash": "{{{commitMessage}}} (#{{prNumber}})" } }I do not feel strongly about the exact shape of the option. The important part is that users of GitHub
MERGEplatform automerge can keep GitHub’s default merge commit message.All reactions