diff --git a/gh-protections.tf b/gh-protections.tf index 3bdc160..2c0f8ca 100644 --- a/gh-protections.tf +++ b/gh-protections.tf @@ -11,7 +11,7 @@ resource "github_branch_protection" "protections" { repository_id = github_repository.repositories[each.key].node_id pattern = "main" enforce_admins = false - allows_force_pushes = true + allows_force_pushes = false required_linear_history = true require_conversation_resolution = true required_status_checks { diff --git a/gh-repositories.tf b/gh-repositories.tf index 06c83aa..bac3325 100644 --- a/gh-repositories.tf +++ b/gh-repositories.tf @@ -7,9 +7,15 @@ import { */ resource "github_repository" "repositories" { - for_each = local.github_repositories - name = each.key - visibility = var.github_visibility + for_each = local.github_repositories + name = each.key + visibility = var.github_visibility + allow_squash_merge = true + allow_merge_commit = true + allow_rebase_merge = false + delete_branch_on_merge = true + squash_merge_commit_title = "PR_TITLE" + squash_merge_commit_message = "PR_BODY" lifecycle { ignore_changes = [ description,