summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorkolaente <k@knt.li>2022-11-23 11:24:03 +0100
committerGitHub <noreply@github.com>2022-11-23 18:24:03 +0800
commit13746f070ddb4b7ba93249e9335352431073c271 (patch)
tree4f866b4a2d5b2a4c4ef0f2a74f59bebdc1c95b0d /templates/repo/issue
parent4d42cbbcc2acbc81102a1abbcc6eec67b6802832 (diff)
downloadgitea-13746f070ddb4b7ba93249e9335352431073c271.tar.gz
gitea-13746f070ddb4b7ba93249e9335352431073c271.zip
feat: add button to quickly clear merge message (#21548)
This PR adds a button to allow quickly clearing the merge message of a PR. The button will remove everything but the git trailers. I found myself often pruning the commit message before merging, especially for PRs generated by renovate - renovate puts a very long and detailed comment with the full changelog in each PR it opens. This clutters the commit message. However, I want to explicitly preserve the git commit trailers. Doing this manually works, but having a button is a lot easier. Screenshot: ![image](https://user-images.githubusercontent.com/13721712/197337525-d456d0f8-1f7c-43a9-815d-ca93b1e7a90a.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view_content/pull.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 1e07225300..9e0909064d 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -351,6 +351,8 @@
'textAutoMergeButtonWhenSucceed': {{$.locale.Tr "repo.pulls.auto_merge_button_when_succeed"}},
'textAutoMergeWhenSucceed': {{$.locale.Tr "repo.pulls.auto_merge_when_succeed"}},
'textAutoMergeCancelSchedule': {{$.locale.Tr "repo.pulls.auto_merge_cancel_schedule"}},
+ 'textClearMergeMessage': {{$.locale.Tr "repo.pulls.clear_merge_message"}},
+ 'textClearMergeMessageHint': {{$.locale.Tr "repo.pulls.clear_merge_message_hint"}},
'canMergeNow': {{$canMergeNow}},
'allOverridableChecksOk': {{not $notAllOverridableChecksOk}},
@@ -360,6 +362,7 @@
'defaultMergeStyle': {{.MergeStyle}},
'defaultDeleteBranchAfterMerge': {{$prUnit.PullRequestsConfig.DefaultDeleteBranchAfterMerge}},
'mergeMessageFieldPlaceHolder': {{$.locale.Tr "repo.editor.commit_message_desc"}},
+ 'defaultMergeMessage': defaultMergeMessage,
'hasPendingPullRequestMerge': {{.HasPendingPullRequestMerge}},
'hasPendingPullRequestMergeTip': {{$hasPendingPullRequestMergeTip}},