Skip to content

Commit 8e4d4ad

Browse files
committed
Add branch protection for 2026.1 Gazpacho
Although 2026.1 Gazpacho supports Python 3.10 [1], we don't use it anywhere. Save some CI resources by running only Python 3.12 jobs. [1] https://governance.openstack.org/tc/reference/runtimes/2026.1.html
1 parent 196b00d commit 8e4d4ad

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

terraform/github/branches.tf

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,42 @@ resource "github_branch_protection" "kayobe_branch_protection_epoxy" {
291291
}
292292
}
293293

294+
resource "github_branch_protection" "kayobe_branch_protection_gazpacho" {
295+
for_each = toset(var.repositories["Kayobe"])
296+
repository_id = data.github_repository.repositories[each.key].node_id
297+
298+
pattern = "stackhpc/2026.1"
299+
require_conversation_resolution = true
300+
allows_deletions = false
301+
allows_force_pushes = false
302+
303+
required_pull_request_reviews {
304+
dismiss_stale_reviews = true
305+
require_code_owner_reviews = true
306+
required_approving_review_count = 1
307+
}
308+
309+
restrict_pushes {
310+
blocks_creations = false
311+
push_allowances = [
312+
resource.github_team.organisation_teams["Developers"].node_id
313+
]
314+
}
315+
316+
required_status_checks {
317+
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/2026.1", lookup(var.required_status_checks, each.key, {
318+
"default" : [
319+
"tox / Tox pep8 with Python 3.12",
320+
"tox / Tox py3 with Python 3.12",
321+
]
322+
}).default)
323+
strict = false
324+
}
325+
326+
lifecycle {
327+
prevent_destroy = true
328+
}
329+
}
294330

295331
resource "github_branch_protection" "kayobe_branch_protection_master" {
296332
for_each = toset(var.repositories["Kayobe"])
@@ -520,6 +556,43 @@ resource "github_branch_protection" "openstack_branch_protection_epoxy" {
520556
}
521557
}
522558

559+
resource "github_branch_protection" "openstack_branch_protection_gazpacho" {
560+
for_each = toset(var.repositories["OpenStack"])
561+
repository_id = data.github_repository.repositories[each.key].node_id
562+
563+
pattern = "stackhpc/2026.1"
564+
require_conversation_resolution = true
565+
allows_deletions = false
566+
allows_force_pushes = false
567+
568+
restrict_pushes {
569+
blocks_creations = false
570+
push_allowances = [
571+
resource.github_team.organisation_teams["Developers"].node_id
572+
]
573+
}
574+
575+
required_pull_request_reviews {
576+
dismiss_stale_reviews = true
577+
require_code_owner_reviews = true
578+
required_approving_review_count = 1
579+
}
580+
581+
required_status_checks {
582+
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/2026.1", lookup(var.required_status_checks, each.key, {
583+
"default" : [
584+
"tox / Tox pep8 with Python 3.12",
585+
"tox / Tox py3 with Python 3.12",
586+
]
587+
}).default)
588+
strict = false
589+
}
590+
591+
lifecycle {
592+
prevent_destroy = false
593+
}
594+
}
595+
523596
resource "github_branch_protection" "openstack_branch_protection_master" {
524597
for_each = toset(var.repositories["OpenStack"])
525598
repository_id = data.github_repository.repositories[each.key].node_id

0 commit comments

Comments
 (0)