Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit includes the `required_approving_review_count` field on the `github_branch_protection` resource, allowing to manage the miminum amount of reviewers to allow a merge to happen. This field must be between 1 - 6, according to the docs, and must be valid if present. Bumping the `go-github` to `v24` made it default to `0` when not present, causing the followin error <detail> <summary>GitHub API error when count is 0</summary> ``` 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"=>true, "required_approving_review_count"=>0} is not a null. [] Payload: { "required_status_checks": { "strict": true, "contexts": [ "lint", "test" ] }, "required_pull_request_reviews": { "dismissal_restrictions": { "users": [], "teams": [] }, "dismiss_stale_reviews": false, "require_code_owner_reviews": true, "required_approving_review_count": 0 }, "enforce_admins": true, "restrictions": null } ``` </detail> This PR is important when upgrading `go-github`. Built on top of: https://github.com/terraform-providers/terraform-provider-github/pull/207
- Loading branch information