Skip to content

Commit

Permalink
Merge pull request #87 from sprankhub/mono-repo-permissions
Browse files Browse the repository at this point in the history
Add mono repo push allowances, fixes #85
  • Loading branch information
sprankhub committed Jun 13, 2024
2 parents 2b26852 + 24eac42 commit 8b7d20f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
21 changes: 12 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8b7d20f

Please sign in to comment.