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:
parent
34df4e5df5
commit
09304db9a5
2 changed files with 10 additions and 22 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue