diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-05-08 20:32:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 20:32:45 +0800 |
commit | 4344a6410788f30848e5153f6356dcdd0774bebc (patch) | |
tree | 6eba1230f1ac672f0eb0a36f148949470dd50048 /templates | |
parent | 5ca224a789394d00cc1efb5afcae7b87aa7d1e49 (diff) | |
download | gitea-4344a6410788f30848e5153f6356dcdd0774bebc.tar.gz gitea-4344a6410788f30848e5153f6356dcdd0774bebc.zip |
Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (#18177)
* Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md
* Some improvements
* Follow some advices
* Fix bug
* Fix bug
* Fix lint
* Fix close comment
* Fix test
* Fix and docs
* Improve codes
* Update docs and remove unnecessary variables
* return error for GetDefaultMergeMessage
* Fix test
* improve code
* ignore unknow unit type
* return error for GetDefaultMergeMessage
* Update services/pull/merge.go
* Some improvements
* Follow some advices
* Fix bug
* Fix lint
* Improve codes
* Update docs and remove unnecessary variables
* return error for GetDefaultMergeMessage
* improve code
* Handle deleted HeadRepo in GetDefaultMergeMessage
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix test
* Fix test
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 8c43ace32e..07b2e89d24 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -329,7 +329,7 @@ {{.CsrfTokenHtml}} <input type="hidden" name="head_commit_id" value="{{.PullHeadCommitID}}"> <div class="field"> - <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage $.Context}}"> + <input type="text" name="merge_title_field" value="{{.DefaultMergeMessage}}"> </div> <div class="field"> <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}} {{$approvers}}</textarea> @@ -375,10 +375,7 @@ {{.CsrfTokenHtml}} <input type="hidden" name="head_commit_id" value="{{.PullHeadCommitID}}"> <div class="field"> - <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage $.Context}}"> - </div> - <div class="field"> - <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">Reviewed-on: {{$.Issue.HTMLURL}} {{$approvers}}</textarea> + <input type="text" name="merge_title_field" value="{{.DefaultMergeMessage}}"> </div> <button class="ui green button" type="submit" name="do" value="rebase-merge"> {{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}} @@ -401,7 +398,7 @@ {{.CsrfTokenHtml}} <input type="hidden" name="head_commit_id" value="{{.PullHeadCommitID}}"> <div class="field"> - <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultSquashMessage $.Context}}"> + <input type="text" name="merge_title_field" value="{{.DefaultSquashMergeMessage}}"> </div> <div class="field"> <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{.GetCommitMessages}}Reviewed-on: {{$.Issue.HTMLURL}} {{$approvers}}</textarea> |