enhance(pull)!: add per-repository default squash merge commit message (#39816)

Adds a repository setting for the default squash merge commit message
body with GitHub's options `PR_BODY`, `COMMIT_MESSAGES` and `BLANK`,
also settable via `squash_merge_commit_message` in the API. The commit
title stays the pull request title.

1. Breaking: API squash merges without `merge_message_field` now get the
same default message as the web merge box instead of a title-only
commit, which affects clients sending only `Do` like Renovate. An empty
value keeps title-only.
2. Breaking: `[repository.pull-request] DEFAULT_SQUASH_MERGE_MESSAGE`
replaces `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`, which still
works as a deprecated fallback. Repositories store the default when
created or next saved.
3. Deprecated app.ini keys now migrate through one table instead of
per-loader fallbacks, which also fixes the ignored `[mailer] CERT_FILE`
and `KEY_FILE` fallbacks. Deprecation warnings no longer claim a removal
version.

<img width="1891" height="571" alt="grafik"
src="https://github.com/user-attachments/assets/0fdcde13-1f11-4156-b598-d80eb0d04cbe"
/>

---------

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
bircniandsilverwind authored and GitHub committed 2026-10-19 09:15:41 +00:00
1 parent 458eda0f1d
commit ba4f8fa246
37 files changed
+273 -156

No files matched your search

+9
View File
@@ -605,6 +605,15 @@
</div>
</div>
</div>
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.pulls.default_squash_merge_message"}}</label>
{{$squashMergeMessage := $prUnit.PullRequestsConfig.DefaultSquashMergeMessage}}
<select class="ui selection dropdown" name="pulls_default_squash_merge_message">
<option value="BLANK" {{if eq $squashMergeMessage "BLANK"}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.pulls.default_squash_merge_message.title"}}</option>
<option value="COMMIT_MESSAGES" {{if eq $squashMergeMessage "COMMIT_MESSAGES"}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.pulls.default_squash_merge_message.title_and_commit_details"}}</option>
<option value="PR_BODY" {{if eq $squashMergeMessage "PR_BODY"}}selected{{end}}>{{ctx.Locale.Tr "repo.settings.pulls.default_squash_merge_message.title_and_description"}}</option>
</select>
</div>
<div class="field">
<label>{{ctx.Locale.Tr "repo.settings.pulls.default_target_branch"}}</label>
<div class="ui search selection dropdown">
+9
View File
@@ -6167,6 +6167,11 @@
"type": "string",
"x-go-name": "ProjectsMode"
},
"squash_merge_commit_message": {
"description": "set the default squash merge commit message body: \"PR_BODY\", \"COMMIT_MESSAGES\", or \"BLANK\".",
"type": "string",
"x-go-name": "SquashMergeCommitMessage"
},
"template": {
"description": "either `true` to make this repository a template or `false` to make it a normal repository",
"type": "boolean",
@@ -9876,6 +9881,10 @@
"type": "integer",
"x-go-name": "Size"
},
"squash_merge_commit_message": {
"type": "string",
"x-go-name": "SquashMergeCommitMessage"
},
"ssh_url": {
"format": "uri",
"type": "string",
+9
View File
@@ -29273,6 +29273,11 @@
"type": "string",
"x-go-name": "ProjectsMode"
},
"squash_merge_commit_message": {
"description": "set the default squash merge commit message body: \"PR_BODY\", \"COMMIT_MESSAGES\", or \"BLANK\".",
"type": "string",
"x-go-name": "SquashMergeCommitMessage"
},
"template": {
"description": "either `true` to make this repository a template or `false` to make it a normal repository",
"type": "boolean",
@@ -32962,6 +32967,10 @@
"format": "int64",
"x-go-name": "Size"
},
"squash_merge_commit_message": {
"type": "string",
"x-go-name": "SquashMergeCommitMessage"
},
"ssh_url": {
"type": "string",
"x-go-name": "SSHURL"