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

Cleanup and move to a main branch strategy #11

Merged
merged 1 commit into from
Nov 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.