Skip to content

Commit

Permalink
fix: remove playground2 (#42)
Browse files Browse the repository at this point in the history
Additionally, some changes to terraform action so it will stop spamming
with changing merge-commits
- `merge_commit_title` and `merge_commit_message` are set only if
`allow_merge_commit`
- `squash_merge_commit_title` and `squash_merge_commit_message` are set
only if `allow_squash_merge`
  • Loading branch information
cunla committed Sep 2, 2024
1 parent e2bc69e commit 747ca13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
11 changes: 1 addition & 10 deletions terraform/production/repositories.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ repositories = {
allow_merge_commit = false
allow_rebase_merge = true
has_projects = false

admins = [
"pfouque",
"natim",
Expand All @@ -77,14 +78,4 @@ repositories = {
members = []
}


"playground2" = {
description = "Tests"

admins = [
"cunla",
]
committers = []
members = []
}
}
8 changes: 4 additions & 4 deletions terraform/resources-repos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ resource "github_repository" "this" {
homepage_url = each.value.homepage_url
allow_auto_merge = each.value.allow_auto_merge
allow_merge_commit = each.value.allow_merge_commit
merge_commit_title = each.value.merge_commit_title
merge_commit_message = each.value.merge_commit_message
merge_commit_title = each.value.allow_merge_commit ? each.value.merge_commit_title : null
merge_commit_message = each.value.allow_merge_commit ? each.value.merge_commit_message : null
allow_rebase_merge = each.value.allow_rebase_merge
allow_squash_merge = each.value.allow_squash_merge
squash_merge_commit_title = each.value.squash_merge_commit_title
squash_merge_commit_message = each.value.squash_merge_commit_message
squash_merge_commit_title = each.value.allow_squash_merge ? each.value.squash_merge_commit_title : null
squash_merge_commit_message = each.value.allow_squash_merge ? each.value.squash_merge_commit_message : null
allow_update_branch = each.value.allow_update_branch
archive_on_destroy = true
delete_branch_on_merge = each.value.delete_branch_on_merge
Expand Down
8 changes: 4 additions & 4 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ variable "repositories" {
members = optional(set(string), []) # Members of the repository team. Have triage permissions

# The following are valid combinations for the merge commit title and message: PR_TITLE and PR_BODY, PR_TITLE and BLANK, MERGE_MESAGE and PR_TITLE. (invalid_merge_commit_setting_combo)}]
merge_commit_title = optional(string, "PR_TITLE")
merge_commit_message = optional(string, "PR_BODY")
squash_merge_commit_title = optional(string, "PR_TITLE")
squash_merge_commit_message = optional(string, "PR_BODY")
merge_commit_title = optional(string, null)
merge_commit_message = optional(string, null)
squash_merge_commit_title = optional(string, null)
squash_merge_commit_message = optional(string, null)
}))
}

Expand Down

0 comments on commit 747ca13

Please sign in to comment.