From c0849b7b36fc808e4ba820a9cda3fa2e515b9d4a Mon Sep 17 00:00:00 2001 From: Marko Gacesa Date: Wed, 18 Oct 2023 16:33:55 +0000 Subject: [PATCH] remove branch rule: all status checks must succeed (#691) --- app/services/protection/rule_branch.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/services/protection/rule_branch.go b/app/services/protection/rule_branch.go index 2bd1d4406..32b4c4c20 100644 --- a/app/services/protection/rule_branch.go +++ b/app/services/protection/rule_branch.go @@ -103,16 +103,6 @@ func (v *Branch) CanMerge(_ context.Context, in CanMergeInput) (CanMergeOutput, } } - if v.PullReq.StatusChecks.AllMustSucceed { - for i := range in.Checks { - if in.Checks[i].Status != enum.CheckStatusSuccess { - violations.Add("pullreq.status_checks.all_must_succeed", - "All status checks must complete successfully.") - break - } - } - } - // pullreq.merge if len(v.PullReq.Merge.StrategiesAllowed) > 0 { // Note: Empty allowed strategies list means all are allowed @@ -177,8 +167,7 @@ func (v DefComments) Validate() error { } type DefStatusChecks struct { - RequireUIDs []string `json:"require_uids,omitempty"` - AllMustSucceed bool `json:"all_must_succeed,omitempty"` + RequireUIDs []string `json:"require_uids,omitempty"` } func (v DefStatusChecks) Validate() error {