diff options
author | zeripath <art27@cantab.net> | 2019-12-30 23:34:11 +0000 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-12-30 18:34:11 -0500 |
commit | 0c07f1de5b8cf7b9f9f607aae76a53c99aeb2c04 (patch) | |
tree | d9dcb3161784f012ae80429aae8a9576894e0fd2 /templates | |
parent | b983ff447387d40700ad8c0a56f90052878fec98 (diff) | |
download | gitea-0c07f1de5b8cf7b9f9f607aae76a53c99aeb2c04.tar.gz gitea-0c07f1de5b8cf7b9f9f607aae76a53c99aeb2c04.zip |
Provide Default messages for merges (#9393)
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index 04f8a86cad..3503a51742 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -131,6 +131,7 @@ {{end}} {{if .AllowMerge}} {{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}} + {{$approvers := .Issue.PullRequest.GetApprovers}} {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash}} <div class="ui divider"></div> {{if $prUnit.PullRequestsConfig.AllowMerge}} @@ -141,7 +142,7 @@ <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}"> </div> <div class="field"> - <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}"></textarea> + <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{$approvers}}</textarea> </div> <button class="ui green button" type="submit" name="do" value="merge"> {{$.i18n.Tr "repo.pulls.merge_pull_request"}} @@ -173,7 +174,7 @@ <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultMergeMessage}}"> </div> <div class="field"> - <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}"></textarea> + <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{$approvers}}</textarea> </div> <button class="ui green button" type="submit" name="do" value="rebase-merge"> {{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}} @@ -185,6 +186,7 @@ </div> {{end}} {{if $prUnit.PullRequestsConfig.AllowSquash}} + {{$commitMessages := .Issue.PullRequest.GetCommitMessages}} <div class="ui form squash-fields" style="display: none"> <form action="{{.Link}}/merge" method="post"> {{.CsrfTokenHtml}} @@ -192,7 +194,7 @@ <input type="text" name="merge_title_field" value="{{.Issue.PullRequest.GetDefaultSquashMessage}}"> </div> <div class="field"> - <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}"></textarea> + <textarea name="merge_message_field" rows="5" placeholder="{{$.i18n.Tr "repo.editor.commit_message_desc"}}">{{$commitMessages}}{{$approvers}}</textarea> </div> <button class="ui green button" type="submit" name="do" value="squash"> {{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}} |