summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
authorJulian <julian.toelle97@gmail.com>2018-12-27 11:27:08 +0100
committerLauris BH <lauris@nix.lv>2018-12-27 12:27:08 +0200
commit4a685f8b872a3d4c101c5e8165fa99e696c8fb45 (patch)
tree7ad36ee9bf87cec61ee0967a50037d9331d2ab58 /templates/repo/issue
parent58bdff53cd98e33791f91584d02887864aabc5c4 (diff)
downloadgitea-4a685f8b872a3d4c101c5e8165fa99e696c8fb45.tar.gz
gitea-4a685f8b872a3d4c101c5e8165fa99e696c8fb45.zip
Add rebase with merge commit merge style (#3844) (#4052)
Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view_content/pull.tmpl27
1 files changed, 26 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 5edde9051f..72808d089b 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -86,7 +86,7 @@
</div>
{{if .AllowMerge}}
{{$prUnit := .Repository.MustGetUnit $.UnitTypePullRequests}}
- {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowSquash}}
+ {{if or $prUnit.PullRequestsConfig.AllowMerge $prUnit.PullRequestsConfig.AllowRebase $prUnit.PullRequestsConfig.AllowRebaseMerge $prUnit.PullRequestsConfig.AllowSquash}}
<div class="ui divider"></div>
{{if $prUnit.PullRequestsConfig.AllowMerge}}
<div class="ui form merge-fields" style="display: none">
@@ -120,6 +120,25 @@
</form>
</div>
{{end}}
+ {{if $prUnit.PullRequestsConfig.AllowRebaseMerge}}
+ <div class="ui form rebase-merge-fields" style="display: none">
+ <form action="{{.Link}}/merge" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="field">
+ <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>
+ </div>
+ <button class="ui green button" type="submit" name="do" value="rebase-merge">
+ {{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
+ </button>
+ <button class="ui button merge-cancel">
+ {{$.i18n.Tr "cancel"}}
+ </button>
+ </form>
+ </div>
+ {{end}}
{{if $prUnit.PullRequestsConfig.AllowSquash}}
<div class="ui form squash-fields" style="display: none">
<form action="{{.Link}}/merge" method="post">
@@ -149,6 +168,9 @@
{{if eq .MergeStyle "rebase"}}
{{$.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}
{{end}}
+ {{if eq .MergeStyle "rebase-merge"}}
+ {{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}
+ {{end}}
{{if eq .MergeStyle "squash"}}
{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}
{{end}}
@@ -163,6 +185,9 @@
{{if $prUnit.PullRequestsConfig.AllowRebase}}
<div class="item{{if eq .MergeStyle "rebase"}} active selected{{end}}" data-do="rebase">{{$.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}</div>
{{end}}
+ {{if $prUnit.PullRequestsConfig.AllowRebaseMerge}}
+ <div class="item{{if eq .MergeStyle "rebase-merge"}} active selected{{end}}" data-do="rebase-merge">{{$.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</div>
+ {{end}}
{{if $prUnit.PullRequestsConfig.AllowSquash}}
<div class="item{{if eq .MergeStyle "squash"}} active selected{{end}}" data-do="squash">{{$.i18n.Tr "repo.pulls.squash_merge_pull_request"}}</div>
{{end}}