Skip to content

Commit

Permalink
Fix the error that will encounter if 'Require pull request reviews be…
Browse files Browse the repository at this point in the history
…fore merging' is already enabled. (#12)

2020/05/05 09:27:58 PUT https://api.github.com/repos/:owner/:repo/branches/:branch/protection: 422 Invalid request.
No subschema in "anyOf" matched.
0 must be greater than or equal to 1.
Not all subschemas of "allOf" matched.
For 'anyOf/1', {"dismissal_restrictions"=>{"users"=>[], "teams"=>[]}, "dismiss_stale_reviews"=>false, "require_code_owner_reviews"=>false, "required_approving_review_count"=>0} is not a null. []
  • Loading branch information
psyhomb authored May 7, 2020
1 parent 338110a commit 6aa6fef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func main() {
pullRequestReviewsEnforcementRequest.DismissalRestrictionsRequest = dismissalRestrictionsRequest
pullRequestReviewsEnforcementRequest.DismissStaleReviews = requiredPullRequestReviews.DismissStaleReviews
pullRequestReviewsEnforcementRequest.RequireCodeOwnerReviews = requiredPullRequestReviews.RequireCodeOwnerReviews
pullRequestReviewsEnforcementRequest.RequiredApprovingReviewCount = requiredPullRequestReviews.RequiredApprovingReviewCount
protectionRequest.RequiredPullRequestReviews = pullRequestReviewsEnforcementRequest
}

Expand Down

0 comments on commit 6aa6fef

Please sign in to comment.