Skip to content

Commit

Permalink
Cleanup and move to a main branch strategy (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
xorima committed Nov 28, 2020
1 parent 2cb98af commit 6b86234
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 73 deletions.
28 changes: 0 additions & 28 deletions bats.tf

This file was deleted.

23 changes: 0 additions & 23 deletions modules/repository/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 0 additions & 22 deletions rake.tf

This file was deleted.

0 comments on commit 6b86234

Please sign in to comment.