Skip to content

Commit

Permalink
fix: Remove branch protection if repository is archived (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
snovikov authored Jan 25, 2024
1 parent b89babe commit 8fbab37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ locals {
secret_scanning_push_protection = "disabled"
}

rendered_branch_protection = merge(
rendered_branch_protection = var.archived != true ? merge(
# Branch protection rules for default branch
var.default_branch_protection_enabled ? {
default = var.default_branch_protection
} : {},
# Additional branch protection rules
var.branch_protection
)
) : {}

# Combine defaults with input parameters
rendered_webhooks = {
Expand Down

0 comments on commit 8fbab37

Please sign in to comment.