Skip to content

Commit df8f6f7

Browse files
authored
Merge branch 'main' into trigger-plan
2 parents 531a77f + bb7d6c7 commit df8f6f7

File tree

6 files changed

+85
-80
lines changed

6 files changed

+85
-80
lines changed

.github/workflows/plan.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ jobs:
1313

1414
permissions:
1515
pull-requests: write
16-
# These are necessary due to GitHub's API as per:
17-
# https://github.com/integrations/terraform-provider-github/issues/679#issuecomment-2068196839
1816
contents: write
19-
administration: read
2017

2118
steps:
2219
- name: Checkout code

terraform/production/org.tfvars

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ members = [
1818
"priyapahwa",
1919
"testSchilling",
2020
"maerteijn",
21+
"g-nie",
2122
]
2223

2324
organization_teams = {
@@ -40,10 +41,6 @@ organization_teams = {
4041
"matthiask"
4142
]
4243
permission = "push"
43-
44-
repositories = [
45-
"django-commons-playground",
46-
]
4744
}
4845
}
4946

terraform/resources-org.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,16 @@ resource "github_team_members" "org_team_members" {
3232
for_each = each.value.members
3333

3434
content {
35-
# members here references the dynamic name, not the looped entity.
3635
username = members.value
3736
role = "member"
3837
}
3938
}
4039

41-
# Maintainer here means the maintainer role for the team.
42-
# It's not a maintainer of the repo.
40+
# Maintainer here means the maintainer role for the team. It's not a maintainer of the repo.
4341
dynamic "members" {
4442
for_each = each.value.maintainers
4543

4644
content {
47-
# members here references the dynamic name, not the looped entity.
4845
username = members.value
4946
role = "maintainer"
5047
}

terraform/resources-repos.tf

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,30 @@
22
# https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository
33

44
resource "github_repository" "this" {
5-
6-
# Ensure GitHub repository is Private
7-
# checkov:skip=CKV_GIT_1: Public is ok for us since we are an open source project
8-
95
for_each = var.repositories
106

11-
allow_auto_merge = each.value.allow_auto_merge
12-
allow_merge_commit = each.value.allow_merge_commit
13-
merge_commit_title = "MERGE_MESSAGE"
14-
merge_commit_message = "PR_BODY"
15-
allow_rebase_merge = each.value.allow_rebase_merge
16-
allow_squash_merge = each.value.allow_squash_merge
17-
squash_merge_commit_title = "COMMIT_OR_PR_TITLE"
18-
squash_merge_commit_message = "COMMIT_MESSAGES"
19-
allow_update_branch = each.value.allow_update_branch
20-
archive_on_destroy = true
21-
delete_branch_on_merge = each.value.delete_branch_on_merge
22-
description = each.value.description
23-
has_downloads = each.value.has_downloads
24-
has_discussions = each.value.has_discussions
25-
has_issues = true
26-
has_projects = true
27-
has_wiki = each.value.has_wiki
28-
is_template = each.value.is_template
29-
name = each.key
30-
topics = each.value.topics
31-
visibility = each.value.visibility
32-
vulnerability_alerts = true
7+
allow_auto_merge = each.value.allow_auto_merge
8+
allow_merge_commit = each.value.allow_merge_commit
9+
merge_commit_title = each.value.merge_commit_title
10+
merge_commit_message = each.value.merge_commit_message
11+
allow_rebase_merge = each.value.allow_rebase_merge
12+
allow_squash_merge = each.value.allow_squash_merge
13+
squash_merge_commit_title = each.value.squash_merge_commit_title
14+
squash_merge_commit_message = each.value.squash_merge_commit_message
15+
allow_update_branch = each.value.allow_update_branch
16+
archive_on_destroy = true
17+
delete_branch_on_merge = each.value.delete_branch_on_merge
18+
description = each.value.description
19+
has_downloads = each.value.has_downloads
20+
has_discussions = each.value.has_discussions
21+
has_issues = true
22+
has_projects = true
23+
has_wiki = each.value.has_wiki
24+
is_template = each.value.is_template
25+
name = each.key
26+
topics = each.value.topics
27+
visibility = each.value.visibility
28+
vulnerability_alerts = true
3329

3430
dynamic "template" {
3531
for_each = each.value.template != null ? [each.value.template] : []
@@ -62,7 +58,7 @@ resource "github_repository" "this" {
6258
# required_pull_request_reviews {
6359
# dismiss_stale_reviews = true
6460
# require_code_owner_reviews = true
65-
# required_approving_review_count = 1
61+
# required_approving_review_count = github_repository.this[each.key].required_approving_review_count
6662
# }
6763
#
6864
# required_status_checks {

0 commit comments

Comments
 (0)