Skip to content

Commit

Permalink
fixup! Uplift branch_protection resource to use v4 API
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmarabeas authored and Jeremy Udit committed Sep 6, 2020
1 parent 330dbd9 commit 3bc761a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions github/util_v4_branch_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func setActorIDs(actors []ActorTypes) []string {
}

func setApprovingReviews(protection BranchProtectionRule) interface{} {
if protection.RequiresApprovingReviews == false {
if !protection.RequiresApprovingReviews {
return nil
}

Expand All @@ -192,7 +192,7 @@ func setApprovingReviews(protection BranchProtectionRule) interface{} {
}

func setStatusChecks(protection BranchProtectionRule) interface{} {
if protection.RequiresStatusChecks == false {
if !protection.RequiresStatusChecks {
return nil
}

Expand All @@ -207,7 +207,7 @@ func setStatusChecks(protection BranchProtectionRule) interface{} {
}

func setPushes(protection BranchProtectionRule) []string {
if protection.RestrictsPushes == false {
if !protection.RestrictsPushes {
return nil
}
pushAllowances := protection.PushAllowances.Nodes
Expand Down

0 comments on commit 3bc761a

Please sign in to comment.