-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdenhaag.tf
179 lines (152 loc) · 5.14 KB
/
denhaag.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
resource "github_repository" "denhaag" {
name = "denhaag"
description = "Work in Progress: Den Haag Design System based on the NL Design System architecture"
allow_merge_commit = false
allow_rebase_merge = true
allow_squash_merge = true
delete_branch_on_merge = true
has_issues = true
has_downloads = false
has_projects = true
has_wiki = false
vulnerability_alerts = true
homepage_url = "https://nl-design-system.github.io/denhaag/"
squash_merge_commit_title = "PR_TITLE"
squash_merge_commit_message = "PR_BODY"
topics = ["nl-design-system", "storybook", "react", "component-library"]
template {
include_all_branches = false
owner = "nl-design-system"
repository = "example"
}
pages {
source {
branch = "gh-pages"
path = "/"
}
}
lifecycle {
prevent_destroy = true
}
}
resource "github_branch_protection" "denhaag-main" {
repository_id = github_repository.denhaag.node_id
pattern = "main"
enforce_admins = false
allows_deletions = false
require_signed_commits = false
required_linear_history = true
require_conversation_resolution = true
allows_force_pushes = false
lock_branch = false
restrict_pushes {
blocks_creations = false
push_allowances = [
"/${data.github_user.nl-design-system-ci.username}",
"${data.github_organization.nl-design-system.orgname}/${github_team.kernteam-maintainer.name}",
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-admin.name}",
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-design-system.name}",
]
}
required_status_checks {
strict = false
contexts = ["build", "UI Tests"]
}
required_pull_request_reviews {
dismiss_stale_reviews = true
restrict_dismissals = true
dismissal_restrictions = [
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-admin.slug}",
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-design-system.slug}"
]
pull_request_bypassers = [
"/${data.github_user.nl-design-system-ci.username}",
]
}
}
resource "github_branch_protection" "denhaag-gh-pages" {
repository_id = github_repository.denhaag.node_id
pattern = "gh-pages"
enforce_admins = true
allows_deletions = false
required_linear_history = true
allows_force_pushes = false
}
resource "github_branch_protection" "denhaag-www-denhaag-nl" {
repository_id = github_repository.denhaag.node_id
pattern = "www.denhaag.nl"
enforce_admins = false
allows_deletions = false
require_signed_commits = false
required_linear_history = true
require_conversation_resolution = true
allows_force_pushes = false
lock_branch = false
restrict_pushes {
blocks_creations = false
push_allowances = [
"/${data.github_user.nl-design-system-ci.username}",
"${data.github_organization.nl-design-system.orgname}/${github_team.kernteam-maintainer.name}",
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-admin.name}",
"${data.github_organization.nl-design-system.orgname}/${github_team.gemeente-denhaag-design-system.name}",
"${data.github_organization.nl-design-system.orgname}/${github_team.denhaag-acato.name}",
]
}
required_status_checks {
strict = false
contexts = ["build", "UI Tests"]
}
required_pull_request_reviews {
dismiss_stale_reviews = true
restrict_dismissals = true
dismissal_restrictions = [
"${data.github_organization.nl-design-system.orgname}/${github_team.denhaag-acato.slug}"
]
pull_request_bypassers = [
"/${data.github_user.nl-design-system-ci.username}",
]
}
}
resource "github_repository_collaborators" "denhaag" {
repository = github_repository.denhaag.name
team {
permission = "admin"
team_id = github_team.kernteam-admin.id
}
team {
permission = "maintain"
team_id = github_team.kernteam-maintainer.id
}
team {
permission = "push"
team_id = github_team.kernteam-committer.id
}
team {
permission = "triage"
team_id = github_team.kernteam-triage.id
}
team {
permission = "admin"
team_id = github_team.gemeente-denhaag-admin.id
}
team {
permission = "push"
team_id = github_team.gemeente-denhaag-design-system.id
}
team {
permission = "push"
team_id = github_team.gemeente-denhaag-acato-committer.id
}
team {
permission = "push"
team_id = github_team.denhaag-acato.id
}
team {
permission = "push"
team_id = github_team.frameless.id
}
team {
permission = "maintain"
team_id = github_team.frameless-maintainer.id
}
}