@@ -100,11 +100,11 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-6" {
100
100
}
101
101
}
102
102
103
- resource "github_branch_protection" "kayobe_branch_protection_py_3-10 " {
103
+ resource "github_branch_protection" "kayobe_branch_protection_zed " {
104
104
for_each = toset (var. repositories [" Kayobe" ])
105
105
repository_id = data. github_repository . repositories [each . key ]. node_id
106
106
107
- pattern = " stackhpc/[z,2]* "
107
+ pattern = " stackhpc/zed "
108
108
require_conversation_resolution = true
109
109
allows_deletions = false
110
110
allows_force_pushes = false
@@ -120,7 +120,7 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-10" {
120
120
]
121
121
122
122
required_status_checks {
123
- contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/[z,2]* " , lookup (var. required_status_checks , each. key , {
123
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/zed " , lookup (var. required_status_checks , each. key , {
124
124
" default" : [
125
125
" tox / Tox pep8 with Python 3.10" ,
126
126
" tox / Tox py3 with Python 3.10" ,
@@ -135,6 +135,75 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-10" {
135
135
}
136
136
}
137
137
138
+ resource "github_branch_protection" "kayobe_branch_protection_antelope" {
139
+ for_each = toset (var. repositories [" Kayobe" ])
140
+ repository_id = data. github_repository . repositories [each . key ]. node_id
141
+
142
+ pattern = " stackhpc/2023.1"
143
+ require_conversation_resolution = true
144
+ allows_deletions = false
145
+ allows_force_pushes = false
146
+
147
+ required_pull_request_reviews {
148
+ dismiss_stale_reviews = true
149
+ require_code_owner_reviews = true
150
+ required_approving_review_count = 1
151
+ }
152
+
153
+ push_restrictions = [
154
+ resource . github_team . organisation_teams [" Developers" ]. node_id
155
+ ]
156
+
157
+ required_status_checks {
158
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2023.1" , lookup (var. required_status_checks , each. key , {
159
+ " default" : [
160
+ " tox / Tox pep8 with Python 3.10" ,
161
+ " tox / Tox py3 with Python 3.10" ,
162
+ " tox / Tox py3 with Python 3.8"
163
+ ]
164
+ }). default )
165
+ strict = false
166
+ }
167
+
168
+ lifecycle {
169
+ prevent_destroy = true
170
+ }
171
+ }
172
+
173
+ resource "github_branch_protection" "kayobe_branch_protection_caracal" {
174
+ for_each = toset (var. repositories [" Kayobe" ])
175
+ repository_id = data. github_repository . repositories [each . key ]. node_id
176
+
177
+ pattern = " stackhpc/2024.1"
178
+ require_conversation_resolution = true
179
+ allows_deletions = false
180
+ allows_force_pushes = false
181
+
182
+ required_pull_request_reviews {
183
+ dismiss_stale_reviews = true
184
+ require_code_owner_reviews = true
185
+ required_approving_review_count = 1
186
+ }
187
+
188
+ push_restrictions = [
189
+ resource . github_team . organisation_teams [" Developers" ]. node_id
190
+ ]
191
+
192
+ required_status_checks {
193
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2024.1" , lookup (var. required_status_checks , each. key , {
194
+ " default" : [
195
+ " tox / Tox pep8 with Python 3.10" ,
196
+ " tox / Tox py3 with Python 3.10"
197
+ ]
198
+ }). default )
199
+ strict = false
200
+ }
201
+
202
+ lifecycle {
203
+ prevent_destroy = true
204
+ }
205
+ }
206
+
138
207
resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
139
208
for_each = toset (var. repositories [" OpenStack" ])
140
209
repository_id = data. github_repository . repositories [each . key ]. node_id
@@ -173,11 +242,11 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
173
242
}
174
243
}
175
244
176
- resource "github_branch_protection" "openstack_branch_protection_py_3-10 " {
245
+ resource "github_branch_protection" "openstack_branch_protection_zed " {
177
246
for_each = toset (var. repositories [" OpenStack" ])
178
247
repository_id = data. github_repository . repositories [each . key ]. node_id
179
248
180
- pattern = " stackhpc/[z,2]* "
249
+ pattern = " stackhpc/zed "
181
250
require_conversation_resolution = true
182
251
allows_deletions = false
183
252
allows_force_pushes = false
@@ -193,7 +262,7 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-10" {
193
262
}
194
263
195
264
required_status_checks {
196
- contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/[z,2]* " , lookup (var. required_status_checks , each. key , {
265
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/zed " , lookup (var. required_status_checks , each. key , {
197
266
" default" : [
198
267
" tox / Tox pep8 with Python 3.10" ,
199
268
" tox / Tox py3 with Python 3.10" ,
@@ -208,6 +277,75 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-10" {
208
277
}
209
278
}
210
279
280
+ resource "github_branch_protection" "openstack_branch_protection_antelope" {
281
+ for_each = toset (var. repositories [" OpenStack" ])
282
+ repository_id = data. github_repository . repositories [each . key ]. node_id
283
+
284
+ pattern = " stackhpc/2023.1"
285
+ require_conversation_resolution = true
286
+ allows_deletions = false
287
+ allows_force_pushes = false
288
+
289
+ push_restrictions = [
290
+ resource . github_team . organisation_teams [" Developers" ]. node_id
291
+ ]
292
+
293
+ required_pull_request_reviews {
294
+ dismiss_stale_reviews = true
295
+ require_code_owner_reviews = true
296
+ required_approving_review_count = 1
297
+ }
298
+
299
+ required_status_checks {
300
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2023.1" , lookup (var. required_status_checks , each. key , {
301
+ " default" : [
302
+ " tox / Tox pep8 with Python 3.10" ,
303
+ " tox / Tox py3 with Python 3.10" ,
304
+ " tox / Tox py3 with Python 3.8"
305
+ ]
306
+ }). default )
307
+ strict = false
308
+ }
309
+
310
+ lifecycle {
311
+ prevent_destroy = false
312
+ }
313
+ }
314
+
315
+ resource "github_branch_protection" "openstack_branch_protection_caracal" {
316
+ for_each = toset (var. repositories [" OpenStack" ])
317
+ repository_id = data. github_repository . repositories [each . key ]. node_id
318
+
319
+ pattern = " stackhpc/2024.1"
320
+ require_conversation_resolution = true
321
+ allows_deletions = false
322
+ allows_force_pushes = false
323
+
324
+ push_restrictions = [
325
+ resource . github_team . organisation_teams [" Developers" ]. node_id
326
+ ]
327
+
328
+ required_pull_request_reviews {
329
+ dismiss_stale_reviews = true
330
+ require_code_owner_reviews = true
331
+ required_approving_review_count = 1
332
+ }
333
+
334
+ required_status_checks {
335
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2024.1" , lookup (var. required_status_checks , each. key , {
336
+ " default" : [
337
+ " tox / Tox pep8 with Python 3.10" ,
338
+ " tox / Tox py3 with Python 3.10"
339
+ ]
340
+ }). default )
341
+ strict = false
342
+ }
343
+
344
+ lifecycle {
345
+ prevent_destroy = false
346
+ }
347
+ }
348
+
211
349
resource "github_branch_protection" "platform_branch_protection" {
212
350
for_each = toset (var. repositories [" Platform" ])
213
351
repository_id = data. github_repository . repositories [each . key ]. node_id
0 commit comments