Merge remote-tracking branch 'origin/benvin/github-iuclabs' into benvin/github-iuclabs-hardening
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
output "id" {
|
||||
value = github_team.this.id
|
||||
}
|
||||
|
||||
output "slug" {
|
||||
value = github_team.this.slug
|
||||
}
|
||||
|
||||
@@ -231,6 +231,18 @@ run "unknown_ruleset_rejected" {
|
||||
expect_failures = [var.repository]
|
||||
}
|
||||
|
||||
run "unknown_team_rejected" {
|
||||
command = plan
|
||||
|
||||
variables {
|
||||
repository = {
|
||||
public = { name = "public", codeowners = ["@missing"] }
|
||||
}
|
||||
}
|
||||
|
||||
expect_failures = [var.repository]
|
||||
}
|
||||
|
||||
run "non_main_default_branch_renamed" {
|
||||
command = plan
|
||||
|
||||
|
||||
@@ -108,6 +108,11 @@ variable "repository" {
|
||||
condition = alltrue(flatten([for repo in var.repository : [for rs in repo.rulesets : contains(keys(var.ruleset), rs)]]))
|
||||
error_message = "Unknown rulesets referenced: ${join(", ", distinct(flatten([for name, repo in var.repository : [for rs in repo.rulesets : "${name}/${rs}" if !contains(keys(var.ruleset), rs)]])))}."
|
||||
}
|
||||
|
||||
validation {
|
||||
condition = alltrue(flatten([for repo in var.repository : [for e in concat(repo.maintainers, repo.codeowners) : contains(keys(var.team), trimprefix(e, "@")) if startswith(e, "@")]]))
|
||||
error_message = "Unknown teams referenced: ${join(", ", distinct(flatten([for name, repo in var.repository : [for e in concat(repo.maintainers, repo.codeowners) : "${name}/${e}" if startswith(e, "@") && !contains(keys(var.team), trimprefix(e, "@"))]])))}."
|
||||
}
|
||||
}
|
||||
|
||||
variable "settings" {
|
||||
|
||||
Reference in New Issue
Block a user