From ff1b8b2b9276a8dc086f0cea6acdf964038fe407 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 19 May 2026 01:22:45 +0800 Subject: [PATCH] chore: make DefaultTitleSource default to auto to match GitHub (#37767) It is a changed (breaking) behavior introduced in 1.26, no need to have such a breaking change. --- custom/conf/app.example.ini | 2 +- modules/setting/repository.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 2498050f5d..3dab03d788 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1172,7 +1172,7 @@ LEVEL = Info ;; Default source for the pull request title when opening a new PR. ;; "first-commit" uses the oldest commit's summary. ;; "auto" uses commit's summary if the PR only has one commit, normalizes the branch name if multiple commits. -;DEFAULT_TITLE_SOURCE = first-commit +;DEFAULT_TITLE_SOURCE = auto ;; ;; Delay mergeable check until page view or API access, for pull requests that have not been updated in the specified days when their base branches get updated. ;; Use "-1" to always check all pull requests (old behavior). Use "0" to always delay the checks. diff --git a/modules/setting/repository.go b/modules/setting/repository.go index a8bc91c089..9ae64fcd94 100644 --- a/modules/setting/repository.go +++ b/modules/setting/repository.go @@ -237,7 +237,7 @@ var ( AddCoCommitterTrailers: true, RetargetChildrenOnMerge: true, DelayCheckForInactiveDays: 7, - DefaultTitleSource: RepoPRTitleSourceFirstCommit, + DefaultTitleSource: RepoPRTitleSourceAuto, }, // Issue settings