You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.",
465
+
Elem: &schema.Resource{
466
+
Schema: map[string]*schema.Schema{
467
+
"required_code_scanning_tool": {
468
+
Type: schema.TypeSet,
469
+
MinItems: 1,
470
+
Required: true,
471
+
Description: "Tools that must provide code scanning results for this rule to pass.",
472
+
Elem: &schema.Resource{
473
+
Schema: map[string]*schema.Schema{
474
+
"alerts_threshold": {
475
+
Type: schema.TypeString,
476
+
Required: true,
477
+
Description: "The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`.",
478
+
},
479
+
"security_alerts_threshold": {
480
+
Type: schema.TypeString,
481
+
Required: true,
482
+
Description: "The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`.",
Description: "Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.",
417
+
Elem: &schema.Resource{
418
+
Schema: map[string]*schema.Schema{
419
+
"required_code_scanning_tool": {
420
+
Type: schema.TypeSet,
421
+
MinItems: 1,
422
+
Required: true,
423
+
Description: "Tools that must provide code scanning results for this rule to pass.",
424
+
Elem: &schema.Resource{
425
+
Schema: map[string]*schema.Schema{
426
+
"alerts_threshold": {
427
+
Type: schema.TypeString,
428
+
Required: true,
429
+
Description: "The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`.",
430
+
},
431
+
"security_alerts_threshold": {
432
+
Type: schema.TypeString,
433
+
Required: true,
434
+
Description: "The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`.",
Copy file name to clipboardExpand all lines: website/docs/r/organization_ruleset.html.markdown
+14
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,8 @@ The `rules` block supports the following:
91
91
92
92
*`required_workflows` - (Optional) (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see [below for nested schema](#rules.required_workflows))
93
93
94
+
*`required_code_scanning` - (Optional) (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see [below for nested schema](#rules.required_code_scanning))
95
+
94
96
*`tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see [below for nested schema](#rules.tag_name_pattern))
95
97
96
98
*`update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs.
@@ -171,6 +173,18 @@ The `rules` block supports the following:
171
173
172
174
*`ref` - (Optional) (String) The optional ref from which to fetch the workflow. Defaults to `master`.
173
175
176
+
#### rules.required_code_scanning ####
177
+
178
+
*`required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rules.required_workflows.required_code_scanning_tool))
*`alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`.
183
+
184
+
*`security_alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`.
185
+
186
+
*`tool` - (Required) (String) The name of a code scanning tool.
187
+
174
188
#### rules.tag_name_pattern ####
175
189
176
190
*`operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
Copy file name to clipboardExpand all lines: website/docs/r/repository_ruleset.html.markdown
+12-2
Original file line number
Diff line number
Diff line change
@@ -101,6 +101,8 @@ The `rules` block supports the following:
101
101
102
102
*`tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see [below for nested schema](#rules.tag_name_pattern))
103
103
104
+
*`required_code_scanning` - (Optional) (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see [below for nested schema](#rules.required_code_scanning))
105
+
104
106
*`update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs.
105
107
106
108
*`update_allows_fetch_and_merge` - (Optional) (Boolean) Branch can pull changes from its upstream repository. This is only applicable to forked repositories. Requires `update` to be set to `true`. Note: behaviour is affected by a known bug on the GitHub side which may cause issues when using this parameter.
@@ -179,8 +181,6 @@ The `rules` block supports the following:
179
181
180
182
*`integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from.
181
183
182
-
183
-
184
184
#### rules.tag_name_pattern ####
185
185
186
186
*`operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
@@ -191,7 +191,17 @@ The `rules` block supports the following:
191
191
192
192
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
193
193
194
+
#### rules.required_code_scanning ####
195
+
196
+
*`required_code_scanning_tool` - (Required) (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see [below for nested schema](#rules.required_workflows.required_code_scanning_tool))
*`alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`.
201
+
202
+
*`security_alerts_threshold` - (Required) (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`.
194
203
204
+
*`tool` - (Required) (String) The name of a code scanning tool.
0 commit comments