Skip to content

Commit

Permalink
chore: Add test for v4 branch protections
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Nov 6, 2022
1 parent 31c2492 commit 607046b
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion test/unit-complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,31 @@ module "repository" {
secret = var.webhook_secret
}]

branch_protections = [
branch_protections_v4 = [
{
pattern = "staging"

allows_deletions = false
allows_force_pushes = false
blocks_creations = false
enforce_admins = true
require_conversation_resolution = true
require_signed_commits = true
required_linear_history = true

required_pull_request_reviews = {
dismiss_stale_reviews = true
require_code_owner_reviews = true
required_approving_review_count = 1
}

required_status_checks = {
strict = true
}
}
]

branch_protections_v3 = [
{
branch = "main"
enforce_admins = true
Expand Down

0 comments on commit 607046b

Please sign in to comment.