Skip to content

Commit 747ca13

Browse files
authored
fix: remove playground2 (#42)
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`
1 parent e2bc69e commit 747ca13

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
lines changed

terraform/production/repositories.tfvars

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ repositories = {
6969
allow_merge_commit = false
7070
allow_rebase_merge = true
7171
has_projects = false
72+
7273
admins = [
7374
"pfouque",
7475
"natim",
@@ -77,14 +78,4 @@ repositories = {
7778
members = []
7879
}
7980

80-
81-
"playground2" = {
82-
description = "Tests"
83-
84-
admins = [
85-
"cunla",
86-
]
87-
committers = []
88-
members = []
89-
}
9081
}

terraform/resources-repos.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ resource "github_repository" "this" {
1515
homepage_url = each.value.homepage_url
1616
allow_auto_merge = each.value.allow_auto_merge
1717
allow_merge_commit = each.value.allow_merge_commit
18-
merge_commit_title = each.value.merge_commit_title
19-
merge_commit_message = each.value.merge_commit_message
18+
merge_commit_title = each.value.allow_merge_commit ? each.value.merge_commit_title : null
19+
merge_commit_message = each.value.allow_merge_commit ? each.value.merge_commit_message : null
2020
allow_rebase_merge = each.value.allow_rebase_merge
2121
allow_squash_merge = each.value.allow_squash_merge
22-
squash_merge_commit_title = each.value.squash_merge_commit_title
23-
squash_merge_commit_message = each.value.squash_merge_commit_message
22+
squash_merge_commit_title = each.value.allow_squash_merge ? each.value.squash_merge_commit_title : null
23+
squash_merge_commit_message = each.value.allow_squash_merge ? each.value.squash_merge_commit_message : null
2424
allow_update_branch = each.value.allow_update_branch
2525
archive_on_destroy = true
2626
delete_branch_on_merge = each.value.delete_branch_on_merge

terraform/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ variable "repositories" {
4646
members = optional(set(string), []) # Members of the repository team. Have triage permissions
4747

4848
# 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)}]
49-
merge_commit_title = optional(string, "PR_TITLE")
50-
merge_commit_message = optional(string, "PR_BODY")
51-
squash_merge_commit_title = optional(string, "PR_TITLE")
52-
squash_merge_commit_message = optional(string, "PR_BODY")
49+
merge_commit_title = optional(string, null)
50+
merge_commit_message = optional(string, null)
51+
squash_merge_commit_title = optional(string, null)
52+
squash_merge_commit_message = optional(string, null)
5353
}))
5454
}
5555

0 commit comments

Comments
 (0)