Skip to content

Commit cf3fa6e

Browse files
committed
Fix failing validation
Signed-off-by: Timo Sand <[email protected]>
1 parent 4209c8d commit cf3fa6e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

github/util_ruleset_validation.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func validateRules(ctx context.Context, d *schema.ResourceDiff, allowedRules []g
9494
if !exists {
9595
continue
9696
}
97+
if ruleName == "required_code_scanning" {
98+
ruleName = string(github.RulesetRuleTypeCodeScanning) // This is one of the few rules which is not mapped to the same name in the API.
99+
}
97100
switch ruleValue := ruleValue.(type) {
98101
case []any:
99102
if len(ruleValue) == 0 {

0 commit comments

Comments
 (0)