mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-24 21:34:36 -04:00
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>
This commit is contained in:
parent
7baa7cb98f
commit
7a31292c20
@ -510,6 +510,8 @@ func PrepareViewPullInfo(ctx *context.Context, issue *issues_model.Issue) *git.C
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(ctx, pull)
|
ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(ctx, pull)
|
||||||
|
} else {
|
||||||
|
ctx.Data["GetCommitMessages"] = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName())
|
sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName())
|
||||||
|
@ -395,7 +395,7 @@
|
|||||||
'allowed': {{$prUnit.PullRequestsConfig.AllowSquash}},
|
'allowed': {{$prUnit.PullRequestsConfig.AllowSquash}},
|
||||||
'textDoMerge': {{$.locale.Tr "repo.pulls.squash_merge_pull_request"}},
|
'textDoMerge': {{$.locale.Tr "repo.pulls.squash_merge_pull_request"}},
|
||||||
'mergeTitleFieldText': defaultSquashMergeTitle,
|
'mergeTitleFieldText': defaultSquashMergeTitle,
|
||||||
'mergeMessageFieldText': defaultMergeMessage,
|
'mergeMessageFieldText': {{.GetCommitMessages}} + defaultMergeMessage,
|
||||||
'hideAutoMerge': generalHideAutoMerge,
|
'hideAutoMerge': generalHideAutoMerge,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user