* 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>
// either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.
ctx.Error(http.StatusMethodNotAllowed,"Invalid merge style",fmt.Errorf("%s is not allowed an allowed merge style for this repository",models.MergeStyle(form.Do)))
<div class="ui purple large label">{{svg"octicon-git-merge"}}{{.i18n.Tr"repo.pulls.merged"}}</div>
<div class="ui purple large label">{{svg"octicon-git-merge"16}}{{ifeq.Issue.PullRequest.Status3}}{{.i18n.Tr"repo.pulls.manually_merged"}}{{else}}{{.i18n.Tr"repo.pulls.merged"}}{{end}}</div>
{{elseif.Issue.IsClosed}}
{{elseif.Issue.IsClosed}}
<div class="ui red large label">{{if.Issue.IsPull}}{{svg"octicon-git-pull-request"}}{{else}}{{svg"octicon-issue-closed"}}{{end}}{{.i18n.Tr"repo.issues.closed_title"}}</div>
<div class="ui red large label">{{if.Issue.IsPull}}{{svg"octicon-git-pull-request"}}{{else}}{{svg"octicon-issue-closed"}}{{end}}{{.i18n.Tr"repo.issues.closed_title"}}</div>
"description": "EditRepoOption options when editing a repository's properties",
"description": "EditRepoOption options when editing a repository's properties",
"type": "object",
"type": "object",
"properties": {
"properties": {
"allow_manual_merge": {
"description": "either `true` to allow mark pr as merged manually, or `false` to prevent it. `has_pull_requests` must be `true`.",
"type": "boolean",
"x-go-name": "AllowManualMerge"
},
"allow_merge_commits": {
"allow_merge_commits": {
"description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
"description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.",
"type": "boolean",
"type": "boolean",
@ -13611,6 +13616,11 @@
"type": "boolean",
"type": "boolean",
"x-go-name": "Archived"
"x-go-name": "Archived"
},
},
"autodetect_manual_merge": {
"description": "either `true` to enable AutodetectManualMerge, or `false` to prevent it. `has_pull_requests` must be `true`, Note: In some special cases, misjudgments can occur.",
"type": "boolean",
"x-go-name": "AutodetectManualMerge"
},
"default_branch": {
"default_branch": {
"description": "sets the default branch for this repository.",
"description": "sets the default branch for this repository.",