We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 927bffa commit ac435d6Copy full SHA for ac435d6
services/pull/pull.go
@@ -586,7 +586,13 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string {
586
if setting.Repository.PullRequest.PopulateSquashCommentWithCommitMessages {
587
maxSize := setting.Repository.PullRequest.DefaultMergeMessageSize
588
if maxSize < 0 || stringBuilder.Len() < maxSize {
589
- toWrite := []byte(commit.CommitMessage)
+ var toWrite []byte
590
+ if element == list.Back() {
591
+ toWrite = []byte(strings.TrimPrefix(commit.CommitMessage, pr.Issue.Title))
592
+ } else {
593
+ toWrite = []byte(commit.CommitMessage)
594
+ }
595
+
596
if len(toWrite) > maxSize-stringBuilder.Len() && maxSize > -1 {
597
toWrite = append(toWrite[:maxSize-stringBuilder.Len()], "..."...)
598
}
0 commit comments