diff --git a/github/resource_github_branch_protection.go b/github/resource_github_branch_protection.go index 1fec983f9b..897ca957ed 100644 --- a/github/resource_github_branch_protection.go +++ b/github/resource_github_branch_protection.go @@ -62,7 +62,7 @@ func resourceGithubBranchProtection() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 1, - ValidateFunc: validation.IntBetween(1, 6), + ValidateFunc: validation.IntBetween(0, 6), }, PROTECTION_REQUIRES_CODE_OWNER_REVIEWS: { Type: schema.TypeBool, diff --git a/github/resource_github_branch_protection_v3.go b/github/resource_github_branch_protection_v3.go index 15bc42e407..82a62d3f15 100644 --- a/github/resource_github_branch_protection_v3.go +++ b/github/resource_github_branch_protection_v3.go @@ -101,7 +101,7 @@ func resourceGithubBranchProtectionV3() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 1, - ValidateFunc: validation.IntBetween(1, 6), + ValidateFunc: validation.IntBetween(0, 6), }, }, }, diff --git a/website/docs/r/branch_protection.html.markdown b/website/docs/r/branch_protection.html.markdown index 1db1b1bd15..c998d83c95 100644 --- a/website/docs/r/branch_protection.html.markdown +++ b/website/docs/r/branch_protection.html.markdown @@ -98,7 +98,7 @@ The following arguments are supported: * `restrict_dismissals`: (Optional) Restrict pull request review dismissals. * `dismissal_restrictions`: (Optional) The list of actor IDs with dismissal access. If not empty, `restrict_dismissals` is ignored. * `require_code_owner_reviews`: (Optional) Require an approved review in pull requests including files with a designated code owner. Defaults to `false`. -* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 1-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. +* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. ## Import diff --git a/website/docs/r/branch_protection_v3.html.markdown b/website/docs/r/branch_protection_v3.html.markdown index d9418ac747..285e7df41b 100644 --- a/website/docs/r/branch_protection_v3.html.markdown +++ b/website/docs/r/branch_protection_v3.html.markdown @@ -98,7 +98,7 @@ The following arguments are supported: * `dismissal_teams`: (Optional) The list of team slugs with dismissal access. Always use `slug` of the team, **not** its name. Each team already **has** to have access to the repository. * `require_code_owner_reviews`: (Optional) Require an approved review in pull requests including files with a designated code owner. Defaults to `false`. -* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 1-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. +* `required_approving_review_count`: (Optional) Require x number of approvals to satisfy branch protection requirements. If this is specified it must be a number between 0-6. This requirement matches GitHub's API, see the upstream [documentation](https://developer.github.com/v3/repos/branches/#parameters-1) for more information. ### Restrictions