mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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>
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user