diff options
author | parnic <github@parnic.com> | 2021-03-27 09:55:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-27 15:55:40 +0100 |
commit | f4d27498bdc615605e14f783501e1d1256cd8d22 (patch) | |
tree | 8d04695b060bd8bac65b4a0d669628fe220a23e6 /templates/repo | |
parent | 6b836ac5f7546bc9ffb118b213dba92d3dd9ba8e (diff) | |
download | gitea-f4d27498bdc615605e14f783501e1d1256cd8d22.tar.gz gitea-f4d27498bdc615605e14f783501e1d1256cd8d22.zip |
Add DefaultMergeStyle option to repository (#14789)
Fixes #12293
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/settings/options.tmpl | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index f944eb8d8d..514a2f5c0a 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -346,6 +346,39 @@ <label>{{.i18n.Tr "repo.settings.pulls.enable_autodetect_manual_merge"}}</label> </div> </div> + <div class="field"> + <p> + {{.i18n.Tr "repo.settings.default_merge_style_desc"}} + </p> + <div class="ui dropdown selection" tabindex="0"> + <select name="pulls_default_merge_style"> + <option value="merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}}selected{{end}}>{{.i18n.Tr "repo.pulls.merge_pull_request"}}</option> + <option value="rebase" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}}selected{{end}}>{{.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}</option> + <option value="rebase-merge" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}}selected{{end}}>{{.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</option> + <option value="squash" {{if or (not $pullRequestEnabled) (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}}selected{{end}}>{{.i18n.Tr "repo.pulls.squash_merge_pull_request"}}</option> + </select>{{svg "octicon-triangle-down" 14 "dropdown icon"}} + <div class="default text"> + {{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "merge")}} + {{.i18n.Tr "repo.pulls.merge_pull_request"}} + {{end}} + {{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase")}} + {{.i18n.Tr "repo.pulls.rebase_merge_pull_request"}} + {{end}} + {{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "rebase-merge")}} + {{.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}} + {{end}} + {{if (eq $prUnit.PullRequestsConfig.DefaultMergeStyle "squash")}} + {{.i18n.Tr "repo.pulls.squash_merge_pull_request"}} + {{end}} + </div> + <div class="menu transition hidden" tabindex="-1" style="display: block !important;"> + <div class="item" data-value="merge">{{.i18n.Tr "repo.pulls.merge_pull_request"}}</div> + <div class="item" data-value="rebase">{{.i18n.Tr "repo.pulls.rebase_merge_pull_request"}}</div> + <div class="item" data-value="rebase-merge">{{.i18n.Tr "repo.pulls.rebase_merge_commit_pull_request"}}</div> + <div class="item" data-value="squash">{{.i18n.Tr "repo.pulls.squash_merge_pull_request"}}</div> + </div> + </div> + </div> </div> {{end}} |