From 6b862345f75d948adf765bdf94a0e697751e6b5a Mon Sep 17 00:00:00 2001 From: Jason Field <4923914+Xorima@users.noreply.github.com> Date: Sat, 28 Nov 2020 19:03:42 +0000 Subject: [PATCH] Cleanup and move to a main branch strategy (#11) --- bats.tf | 28 ---------------------------- modules/repository/main.tf | 23 ----------------------- rake.tf | 22 ---------------------- 3 files changed, 73 deletions(-) delete mode 100644 bats.tf delete mode 100644 rake.tf diff --git a/bats.tf b/bats.tf deleted file mode 100644 index 29fac5f..0000000 --- a/bats.tf +++ /dev/null @@ -1,28 +0,0 @@ -module "bats" { - source = "./modules/repository" - name = "bats" - action_team = github_team.bats.id - action_name = "actionshub-bats" - label_validator_config = local.label_validator_config - release_creator_config = local.release_creator_config - changelog_reset_config = local.changelog_reset_config - changelog_validator_config = local.changelog_validator_config -} - -resource "github_team" "bats" { - name = "bats" - description = "bats Action Maintainers" - privacy = "closed" -} - -resource "github_team_membership" "bats-member-rshade" { - team_id = github_team.bats.id - username = "rshade" - role = "member" -} - -resource "github_team_membership" "bats-member-Xorima" { - team_id = github_team.bats.id - username = "Xorima" - role = "maintainer" -} diff --git a/modules/repository/main.tf b/modules/repository/main.tf index fd959f3..1edab05 100644 --- a/modules/repository/main.tf +++ b/modules/repository/main.tf @@ -31,29 +31,6 @@ resource "github_repository" "repository" { } } -resource "github_branch_protection" "repository_master" { - # this is a bit of a hack to allow people to create repositories uninitialized - # and then add branch protection later. The use cases are mostly around needing - # to create "forked" private repositories - count = var.auto_init ? 1 : 0 - - repository = var.name - branch = "master" - enforce_admins = var.enforce_admins - # when a repo is being initialized/created you can run into race conditions by adding an explicit depends we force the repo to be created before it attempts to add branch protection - depends_on = [ - github_repository.repository, - ] - required_status_checks { - strict = var.require_ci_pass - contexts = var.status_checks - } - required_pull_request_reviews { - dismiss_stale_reviews = var.dismiss_stale_reviews - require_code_owner_reviews = var.require_code_owner_reviews - } -} - resource "github_branch_protection" "repository_main" { # this is a bit of a hack to allow people to create repositories uninitialized # and then add branch protection later. The use cases are mostly around needing diff --git a/rake.tf b/rake.tf deleted file mode 100644 index 78dfade..0000000 --- a/rake.tf +++ /dev/null @@ -1,22 +0,0 @@ -module "rake" { - source = "./modules/repository" - name = "rake" - action_team = github_team.rake.id - action_name = "actionshub-rake" - label_validator_config = local.label_validator_config - release_creator_config = local.release_creator_config - changelog_reset_config = local.changelog_reset_config - changelog_validator_config = local.changelog_validator_config -} - -resource "github_team" "rake" { - name = "rake" - description = "rake Action Maintainers" - privacy = "closed" -} - -resource "github_team_membership" "rake-member-Xorima" { - team_id = github_team.rake.id - username = "Xorima" - role = "maintainer" -}