@@ -204,6 +204,77 @@ resource "github_branch_protection" "kayobe_branch_protection_caracal" {
204
204
}
205
205
}
206
206
207
+ resource "github_branch_protection" "kayobe_branch_protection_epoxy" {
208
+ for_each = toset (var. repositories [" Kayobe" ])
209
+ repository_id = data. github_repository . repositories [each . key ]. node_id
210
+
211
+ pattern = " stackhpc/2025.1"
212
+ require_conversation_resolution = true
213
+ allows_deletions = false
214
+ allows_force_pushes = false
215
+
216
+ required_pull_request_reviews {
217
+ dismiss_stale_reviews = true
218
+ require_code_owner_reviews = true
219
+ required_approving_review_count = 1
220
+ }
221
+
222
+ push_restrictions = [
223
+ resource . github_team . organisation_teams [" Developers" ]. node_id
224
+ ]
225
+
226
+ required_status_checks {
227
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2025.1" , lookup (var. required_status_checks , each. key , {
228
+ " default" : [
229
+ " tox / Tox pep8 with Python 3.12" ,
230
+ " tox / Tox py3 with Python 3.12" ,
231
+ " tox / Tox py3 with Python 3.10"
232
+ ]
233
+ }). default )
234
+ strict = false
235
+ }
236
+
237
+ lifecycle {
238
+ prevent_destroy = true
239
+ }
240
+ }
241
+
242
+
243
+ resource "github_branch_protection" "kayobe_branch_protection_master" {
244
+ for_each = toset (var. repositories [" Kayobe" ])
245
+ repository_id = data. github_repository . repositories [each . key ]. node_id
246
+
247
+ pattern = " stackhpc/master"
248
+ require_conversation_resolution = true
249
+ allows_deletions = false
250
+ allows_force_pushes = false
251
+
252
+ required_pull_request_reviews {
253
+ dismiss_stale_reviews = true
254
+ require_code_owner_reviews = true
255
+ required_approving_review_count = 1
256
+ }
257
+
258
+ push_restrictions = [
259
+ resource . github_team . organisation_teams [" Developers" ]. node_id
260
+ ]
261
+
262
+ required_status_checks {
263
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/master" , lookup (var. required_status_checks , each. key , {
264
+ " default" : [
265
+ " tox / Tox pep8 with Python 3.12" ,
266
+ " tox / Tox py3 with Python 3.12" ,
267
+ " tox / Tox py3 with Python 3.10"
268
+ ]
269
+ }). default )
270
+ strict = false
271
+ }
272
+
273
+ lifecycle {
274
+ prevent_destroy = true
275
+ }
276
+ }
277
+
207
278
resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
208
279
for_each = toset (var. repositories [" OpenStack" ])
209
280
repository_id = data. github_repository . repositories [each . key ]. node_id
@@ -346,6 +417,76 @@ resource "github_branch_protection" "openstack_branch_protection_caracal" {
346
417
}
347
418
}
348
419
420
+ resource "github_branch_protection" "openstack_branch_protection_epoxy" {
421
+ for_each = toset (var. repositories [" OpenStack" ])
422
+ repository_id = data. github_repository . repositories [each . key ]. node_id
423
+
424
+ pattern = " stackhpc/2025.1"
425
+ require_conversation_resolution = true
426
+ allows_deletions = false
427
+ allows_force_pushes = false
428
+
429
+ push_restrictions = [
430
+ resource . github_team . organisation_teams [" Developers" ]. node_id
431
+ ]
432
+
433
+ required_pull_request_reviews {
434
+ dismiss_stale_reviews = true
435
+ require_code_owner_reviews = true
436
+ required_approving_review_count = 1
437
+ }
438
+
439
+ required_status_checks {
440
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/2025.1" , lookup (var. required_status_checks , each. key , {
441
+ " default" : [
442
+ " tox / Tox pep8 with Python 3.12" ,
443
+ " tox / Tox py3 with Python 3.12" ,
444
+ " tox / Tox py3 with Python 3.10"
445
+ ]
446
+ }). default )
447
+ strict = false
448
+ }
449
+
450
+ lifecycle {
451
+ prevent_destroy = false
452
+ }
453
+ }
454
+
455
+ resource "github_branch_protection" "openstack_branch_protection_master" {
456
+ for_each = toset (var. repositories [" OpenStack" ])
457
+ repository_id = data. github_repository . repositories [each . key ]. node_id
458
+
459
+ pattern = " stackhpc/master"
460
+ require_conversation_resolution = true
461
+ allows_deletions = false
462
+ allows_force_pushes = false
463
+
464
+ push_restrictions = [
465
+ resource . github_team . organisation_teams [" Developers" ]. node_id
466
+ ]
467
+
468
+ required_pull_request_reviews {
469
+ dismiss_stale_reviews = true
470
+ require_code_owner_reviews = true
471
+ required_approving_review_count = 1
472
+ }
473
+
474
+ required_status_checks {
475
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/master" , lookup (var. required_status_checks , each. key , {
476
+ " default" : [
477
+ " tox / Tox pep8 with Python 3.12" ,
478
+ " tox / Tox py3 with Python 3.12" ,
479
+ " tox / Tox py3 with Python 3.10"
480
+ ]
481
+ }). default )
482
+ strict = false
483
+ }
484
+
485
+ lifecycle {
486
+ prevent_destroy = false
487
+ }
488
+ }
489
+
349
490
resource "github_branch_protection" "platform_branch_protection" {
350
491
for_each = toset (var. repositories [" Platform" ])
351
492
repository_id = data. github_repository . repositories [each . key ]. node_id
0 commit comments