Skip to content

Commit cfd13c1

Browse files
committed
Add "\n" after title unconditionally in case the message is empty
If the message from form.MergeMessageField is empty, we will miss a "\n" between the title and the "Co-authored-by:" line. The title and message should have a blank line between of them.
1 parent 0534edd commit cfd13c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

routers/web/repo/pull.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,8 +1109,9 @@ func MergePullRequest(ctx *context.Context) {
11091109
}
11101110

11111111
form.MergeMessageField = strings.TrimSpace(form.MergeMessageField)
1112+
message += "\n"
11121113
if len(form.MergeMessageField) > 0 {
1113-
message += "\n\n" + form.MergeMessageField
1114+
message += "\n" + form.MergeMessageField
11141115
}
11151116

11161117
if form.MergeWhenChecksSucceed {

0 commit comments

Comments
 (0)