Skip to content

Commit 11b79d8

Browse files
fix: Add missed parameter to the github_organization_ruleset (#2545)
* Add missed parameter to the github_organization_ruleset * Update the markdown --------- Co-authored-by: Nick Floyd <[email protected]>
1 parent cc3736f commit 11b79d8

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

github/resource_github_organization_ruleset.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
261261
Optional: true,
262262
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`.",
263263
},
264+
"do_not_enforce_on_create": {
265+
Type: schema.TypeBool,
266+
Optional: true,
267+
Description: "Allow repositories and branches to be created if a check would otherwise prohibit it.",
268+
Default: false,
269+
},
264270
},
265271
},
266272
},

github/resource_github_organization_ruleset_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
6060
}
6161
6262
strict_required_status_checks_policy = true
63+
do_not_enforce_on_create = true
6364
}
6465
6566
required_workflows {
@@ -251,6 +252,7 @@ func TestGithubOrganizationRulesets(t *testing.T) {
251252
}
252253
253254
strict_required_status_checks_policy = true
255+
do_not_enforce_on_create = true
254256
}
255257
256258
branch_name_pattern {

website/docs/r/organization_ruleset.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ The `rules` block supports the following:
164164

165165
* `strict_required_status_checks_policy` - (Optional) (Boolean) 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`.
166166

167+
* `do_not_enforce_on_create` - (Optional) (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to `false`.
168+
167169
#### required_status_checks.required_check ####
168170

169171
* `context` - (Required) (String) The status check context name that must be present on the commit.

0 commit comments

Comments
 (0)