@@ -204,6 +204,41 @@ resource "github_branch_protection" "kayobe_branch_protection_caracal" {
204
204
}
205
205
}
206
206
207
+ resource "github_branch_protection" "kayobe_branch_protection_master" {
208
+ for_each = toset (var. repositories [" Kayobe" ])
209
+ repository_id = data. github_repository . repositories [each . key ]. node_id
210
+
211
+ pattern = " stackhpc/master"
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/master" , 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
+
207
242
resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
208
243
for_each = toset (var. repositories [" OpenStack" ])
209
244
repository_id = data. github_repository . repositories [each . key ]. node_id
@@ -346,6 +381,41 @@ resource "github_branch_protection" "openstack_branch_protection_caracal" {
346
381
}
347
382
}
348
383
384
+ resource "github_branch_protection" "openstack_branch_protection_master" {
385
+ for_each = toset (var. repositories [" OpenStack" ])
386
+ repository_id = data. github_repository . repositories [each . key ]. node_id
387
+
388
+ pattern = " stackhpc/master"
389
+ require_conversation_resolution = true
390
+ allows_deletions = false
391
+ allows_force_pushes = false
392
+
393
+ push_restrictions = [
394
+ resource . github_team . organisation_teams [" Developers" ]. node_id
395
+ ]
396
+
397
+ required_pull_request_reviews {
398
+ dismiss_stale_reviews = true
399
+ require_code_owner_reviews = true
400
+ required_approving_review_count = 1
401
+ }
402
+
403
+ required_status_checks {
404
+ contexts = lookup (lookup (var. required_status_checks , each. key , {}), " stackhpc/master" , lookup (var. required_status_checks , each. key , {
405
+ " default" : [
406
+ " tox / Tox pep8 with Python 3.12" ,
407
+ " tox / Tox py3 with Python 3.12" ,
408
+ " tox / Tox py3 with Python 3.10"
409
+ ]
410
+ }). default )
411
+ strict = false
412
+ }
413
+
414
+ lifecycle {
415
+ prevent_destroy = false
416
+ }
417
+ }
418
+
349
419
resource "github_branch_protection" "platform_branch_protection" {
350
420
for_each = toset (var. repositories [" Platform" ])
351
421
repository_id = data. github_repository . repositories [each . key ]. node_id
0 commit comments