Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mono repo push allowances, fixes #85 #87

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.mono_repository, 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"]
mono_repository = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this flag mean that it's part of a mono repo? Or that it's a mono repo itself? Can you disambiguate the flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that it is part of a mono repo. Do you have an idea for a better name? I currently cannot think of any.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartOfMonorepo
InMonorepo
MonorepoComponent

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe one of these?

  • is_part_of_monorepo
  • belongs_to_monorepo
  • monorepo_part
  • split_monorepo_part
  • monorepo_slice

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • monorepo_part
  • monorepo_component
  • is_part_of_monorepo
  • belongs_to_monorepo

are my favorite.

}

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"]
mono_repository = 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"]
mono_repository = true
}

mageos-async-events-admin-ui = {
Expand Down