mirror of
https://github.com/harness/drone.git
synced 2025-05-04 23:22:42 +08:00
remove branch rule: all status checks must succeed (#691)
This commit is contained in:
parent
d2b971c49a
commit
c0849b7b36
@ -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
|
||||
@ -178,7 +168,6 @@ func (v DefComments) Validate() error {
|
||||
|
||||
type DefStatusChecks struct {
|
||||
RequireUIDs []string `json:"require_uids,omitempty"`
|
||||
AllMustSucceed bool `json:"all_must_succeed,omitempty"`
|
||||
}
|
||||
|
||||
func (v DefStatusChecks) Validate() error {
|
||||
|
Loading…
Reference in New Issue
Block a user