summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorMura Li <2606021+typeless@users.noreply.github.com>2020-12-22 00:46:14 +0800
committerGitHub <noreply@github.com>2020-12-21 17:46:14 +0100
commit09304db9a5d88c035a96f74a4544572bc8c5dac0 (patch)
tree19d4c329b6f6e5aa7ebce73af6b51d267e527c31 /routers
parent34df4e5df558e7ec648efe083696687be6f8c8a8 (diff)
downloadgitea-09304db9a5d88c035a96f74a4544572bc8c5dac0.tar.gz
gitea-09304db9a5d88c035a96f74a4544572bc8c5dac0.zip
Use the text of pull-request as the squash commit's message (#13071)
Originally, it was filled by the commit messages of the involved commits. In this change, we use the headline comment of the pull request as the commit message when it is a squash merge. Thanks to @zeripath for suggesting the idea. Fixes #12365 Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/pull.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index 442379c43b..b3a1478884 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -440,7 +440,7 @@ func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.Compare
ctx.ServerError("IsUserAllowedToUpdate", err)
return nil
}
- ctx.Data["GetCommitMessages"] = pull_service.GetCommitMessages(pull)
+ ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(pull)
}
sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName())