mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Support template for merge message description (#22248)
Fix #21435. Use the first line of the template as the git commit message title, and the rest as the description. ## Snapshots <img width="806" alt="image" src="https://user-images.githubusercontent.com/9418365/209644083-5d85179c-cf58-404f-bc98-c662398a2411.png"> <img width="860" alt="image" src="https://user-images.githubusercontent.com/9418365/209644392-22573090-e2c1-458b-ba44-855b79735632.png"> <img width="1154" alt="image" src="https://user-images.githubusercontent.com/9418365/209644457-a1b2711a-6787-45b4-b52c-a88d7fc132d7.png"> Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
@ -815,7 +815,7 @@ func MergePullRequest(ctx *context.APIContext) {
|
||||
|
||||
message := strings.TrimSpace(form.MergeTitleField)
|
||||
if len(message) == 0 {
|
||||
message, err = pull_service.GetDefaultMergeMessage(ctx, ctx.Repo.GitRepo, pr, repo_model.MergeStyle(form.Do))
|
||||
message, _, err = pull_service.GetDefaultMergeMessage(ctx, ctx.Repo.GitRepo, pr, repo_model.MergeStyle(form.Do))
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetDefaultMergeMessage", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user