diff --git a/main.tf b/main.tf index 9907027..6a4014a 100644 --- a/main.tf +++ b/main.tf @@ -142,6 +142,10 @@ resource "github_branch_protection" "repositories" { github_team.teams["tech-lead"].node_id, ] } + + restrict_pushes { + push_allowances = try(each.value.is_part_of_monorepo, false) ? [data.github_user.mage-os-ci.node_id] : [] + } } resource "github_branch_default" "repositories" { diff --git a/variables.tf b/variables.tf index 61a4ac9..0f0f239 100644 --- a/variables.tf +++ b/variables.tf @@ -328,21 +328,24 @@ variable "repositories" { } mageos-async-events-aws = { - description = "This module provides events integrations to AWS." - teams = ["distribution", "async-events"] - topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "aws"] + description = "This module provides events integrations to AWS." + teams = ["distribution", "async-events"] + topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "aws"] + is_part_of_monorepo = true } mageos-async-events-azure = { - description = "This module provides events integrations to Azure." - teams = ["distribution", "async-events"] - topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "azure"] + description = "This module provides events integrations to Azure." + teams = ["distribution", "async-events"] + topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "azure"] + is_part_of_monorepo = true } mageos-async-events-gcp = { - description = "This module provides events integrations to GCP." - teams = ["distribution", "async-events"] - topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "gcp"] + description = "This module provides events integrations to GCP." + teams = ["distribution", "async-events"] + topics = ["mage-os", "magento", "ecommerce", "magento2", "adobecommerce", "gcp"] + is_part_of_monorepo = true } mageos-async-events-admin-ui = {