diff options
author | a1012112796 <1012112796@qq.com> | 2021-03-04 11:41:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 22:41:23 -0500 |
commit | a5279b74b63248902a6572df5afa3745367e6cb9 (patch) | |
tree | 7f1fac744013b533bfb0580d48a27d0aae5ab04e /templates/repo/settings | |
parent | 523efa433b61e00e7a14bd31cac315e43842d729 (diff) | |
download | gitea-a5279b74b63248902a6572df5afa3745367e6cb9.tar.gz gitea-a5279b74b63248902a6572df5afa3745367e6cb9.zip |
Make manual merge autodetection optional and add manual merge as merge method (#12543)
* Make auto check manual merge as a chooseable mod and add manual merge way on ui
as title, Before this pr, we use same way with GH to check manually merge.
It good, but in some special cases, misjudgments can occur. and it's hard
to fix this bug. So I add option to allow repo manager block "auto check manual merge"
function, Then it will have same style like gitlab(allow empty pr). and to compensate for
not being able to detect THE PR merge automatically, I added a manual approach.
Signed-off-by: a1012112796 <1012112796@qq.com>
* make swager
* api support
* ping ci
* fix TestPullCreate_EmptyChangesWithCommits
* Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
* Apply review suggestions and add test
* Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
* fix build
* test error message
* make fmt
* Fix indentation issues identified by @silverwind
Co-authored-by: silverwind <me@silverwind.io>
* Fix tests and make manually merged disabled error on API the same
Signed-off-by: Andrew Thornton <art27@cantab.net>
* a small nit
* fix wrong commit id error
* fix bug
* simple test
* fix test
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/repo/settings')
-rw-r--r-- | templates/repo/settings/options.tmpl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index b69f90f9c5..9d87101671 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -330,6 +330,18 @@ <label>{{.i18n.Tr "repo.settings.pulls.allow_squash_commits"}}</label> </div> </div> + <div class="field"> + <div class="ui checkbox"> + <input name="pulls_allow_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AllowManualMerge)}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.pulls.allow_manual_merge"}}</label> + </div> + </div> + <div class="field"> + <div class="ui checkbox"> + <input name="enable_autodetect_manual_merge" type="checkbox" {{if or (not $pullRequestEnabled) ($prUnit.PullRequestsConfig.AutodetectManualMerge)}}checked{{end}}> + <label>{{.i18n.Tr "repo.settings.pulls.enable_autodetect_manual_merge"}}</label> + </div> + </div> </div> {{end}} |