summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2020-11-29 03:30:46 +0800
committerGitHub <noreply@github.com>2020-11-28 21:30:46 +0200
commit9c26dc1f3a742280baff4e9578545bc822016764 (patch)
treeac997d23e59a658b387302ecd65e76a39d99b9e8 /modules/auth
parent7ed5bf8cbe06bf2cfc4980cf6e020dc46dd71a79 (diff)
downloadgitea-9c26dc1f3a742280baff4e9578545bc822016764.tar.gz
gitea-9c26dc1f3a742280baff4e9578545bc822016764.zip
Add block on official review requests branch protection (#13705)
Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/repo_form.go39
1 files changed, 20 insertions, 19 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 2d6f89b6ed..24c2478fa4 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -178,25 +178,26 @@ func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
// ProtectBranchForm form for changing protected branch settings
type ProtectBranchForm struct {
- Protected bool
- EnablePush string
- WhitelistUsers string
- WhitelistTeams string
- WhitelistDeployKeys bool
- EnableMergeWhitelist bool
- MergeWhitelistUsers string
- MergeWhitelistTeams string
- EnableStatusCheck bool `xorm:"NOT NULL DEFAULT false"`
- StatusCheckContexts []string
- RequiredApprovals int64
- EnableApprovalsWhitelist bool
- ApprovalsWhitelistUsers string
- ApprovalsWhitelistTeams string
- BlockOnRejectedReviews bool
- BlockOnOutdatedBranch bool
- DismissStaleApprovals bool
- RequireSignedCommits bool
- ProtectedFilePatterns string
+ Protected bool
+ EnablePush string
+ WhitelistUsers string
+ WhitelistTeams string
+ WhitelistDeployKeys bool
+ EnableMergeWhitelist bool
+ MergeWhitelistUsers string
+ MergeWhitelistTeams string
+ EnableStatusCheck bool
+ StatusCheckContexts []string
+ RequiredApprovals int64
+ EnableApprovalsWhitelist bool
+ ApprovalsWhitelistUsers string
+ ApprovalsWhitelistTeams string
+ BlockOnRejectedReviews bool
+ BlockOnOfficialReviewRequests bool
+ BlockOnOutdatedBranch bool
+ DismissStaleApprovals bool
+ RequireSignedCommits bool
+ ProtectedFilePatterns string
}
// Validate validates the fields