diff options
author | Tyrone Yeh <tyrone_yeh@draytek.com> | 2022-08-03 12:56:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 12:56:59 +0800 |
commit | 7a31292c20b057d59889337b7cf7cb419400d6cb (patch) | |
tree | a7bd7426524d77ec2262d4dd1c6d5aa20d72c6e4 /routers | |
parent | 7baa7cb98f2fff18fb483d9fb11c414844af8898 (diff) | |
download | gitea-7a31292c20b057d59889337b7cf7cb419400d6cb.tar.gz gitea-7a31292c20b057d59889337b7cf7cb419400d6cb.zip |
Add default commit messages to PR for squash merge (#20618)
Keep the same behavior as 1.16
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/pull.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 2a961c3cbc..7c140a4e59 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -510,6 +510,8 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C return nil } ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(ctx, pull) + } else { + ctx.Data["GetCommitMessages"] = "" } sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName()) |