Skip to content
1 change: 1 addition & 0 deletions github/resource_github_organization_ruleset.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
Optional: true,
Description: "Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.",
},

"do_not_enforce_on_create": {
Type: schema.TypeBool,
Optional: true,
Expand Down
3 changes: 3 additions & 0 deletions github/resource_github_organization_ruleset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func TestGithubOrganizationRulesets(t *testing.T) {
}

strict_required_status_checks_policy = true

do_not_enforce_on_create = true

}

required_workflows {
Expand Down Expand Up @@ -252,6 +254,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
}

strict_required_status_checks_policy = true

do_not_enforce_on_create = true
}

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/organization_ruleset.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ The `rules` block supports the following:

* `integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from.

* `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`.

#### rules.required_workflows ####

* `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`.
Expand Down