diff options
author | 6543 <6543@obermui.de> | 2020-04-17 03:00:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 22:00:36 -0300 |
commit | c52d48aae46af879fdfcfd94d03b7072878b5441 (patch) | |
tree | 8a3c5e7ab477059ceabd96a73ecb702602227c19 /modules/structs/repo_branch.go | |
parent | 2cb5878529992c1ffa6de2143d4a1e4673e33b1a (diff) | |
download | gitea-c52d48aae46af879fdfcfd94d03b7072878b5441.tar.gz gitea-c52d48aae46af879fdfcfd94d03b7072878b5441.zip |
Prevent merge of outdated PRs on protected branches (#11012)
* Block PR on Outdated Branch
* finalize
* cleanup
* fix typo and sentences
thanks @guillep2k
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'modules/structs/repo_branch.go')
-rw-r--r-- | modules/structs/repo_branch.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/structs/repo_branch.go b/modules/structs/repo_branch.go index 886018c858..490c63070a 100644 --- a/modules/structs/repo_branch.go +++ b/modules/structs/repo_branch.go @@ -39,6 +39,7 @@ type BranchProtection struct { ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"` ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"` BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"` + BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"` DismissStaleApprovals bool `json:"dismiss_stale_approvals"` RequireSignedCommits bool `json:"require_signed_commits"` ProtectedFilePatterns string `json:"protected_file_patterns"` @@ -66,6 +67,7 @@ type CreateBranchProtectionOption struct { ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"` ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"` BlockOnRejectedReviews bool `json:"block_on_rejected_reviews"` + BlockOnOutdatedBranch bool `json:"block_on_outdated_branch"` DismissStaleApprovals bool `json:"dismiss_stale_approvals"` RequireSignedCommits bool `json:"require_signed_commits"` ProtectedFilePatterns string `json:"protected_file_patterns"` @@ -88,6 +90,7 @@ type EditBranchProtectionOption struct { ApprovalsWhitelistUsernames []string `json:"approvals_whitelist_username"` ApprovalsWhitelistTeams []string `json:"approvals_whitelist_teams"` BlockOnRejectedReviews *bool `json:"block_on_rejected_reviews"` + BlockOnOutdatedBranch *bool `json:"block_on_outdated_branch"` DismissStaleApprovals *bool `json:"dismiss_stale_approvals"` RequireSignedCommits *bool `json:"require_signed_commits"` ProtectedFilePatterns *string `json:"protected_file_patterns"` |