@@ -100,11 +100,11 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-6" {
100100 }
101101}
102102
103- resource "github_branch_protection" "kayobe_branch_protection_py_3-10 " {
103+ resource "github_branch_protection" "kayobe_branch_protection_zed " {
104104 for_each = toset (var. repositories [" Kayobe" ])
105105 repository_id = data. github_repository . repositories [each . key ]. node_id
106106
107- pattern = " stackhpc/[z,2]* "
107+ pattern = " stackhpc/zed "
108108 require_conversation_resolution = true
109109 allows_deletions = false
110110 allows_force_pushes = false
@@ -120,7 +120,7 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-10" {
120120 ]
121121
122122 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 , {
124124 " default" : [
125125 " tox / Tox pep8 with Python 3.10" ,
126126 " tox / Tox py3 with Python 3.10" ,
@@ -135,6 +135,75 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-10" {
135135 }
136136}
137137
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+
138207resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
139208 for_each = toset (var. repositories [" OpenStack" ])
140209 repository_id = data. github_repository . repositories [each . key ]. node_id
@@ -173,11 +242,11 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
173242 }
174243}
175244
176- resource "github_branch_protection" "openstack_branch_protection_py_3-10 " {
245+ resource "github_branch_protection" "openstack_branch_protection_zed " {
177246 for_each = toset (var. repositories [" OpenStack" ])
178247 repository_id = data. github_repository . repositories [each . key ]. node_id
179248
180- pattern = " stackhpc/[z,2]* "
249+ pattern = " stackhpc/zed "
181250 require_conversation_resolution = true
182251 allows_deletions = false
183252 allows_force_pushes = false
@@ -193,7 +262,7 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-10" {
193262 }
194263
195264 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 , {
197266 " default" : [
198267 " tox / Tox pep8 with Python 3.10" ,
199268 " tox / Tox py3 with Python 3.10" ,
@@ -208,6 +277,75 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-10" {
208277 }
209278}
210279
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+
211349resource "github_branch_protection" "platform_branch_protection" {
212350 for_each = toset (var. repositories [" Platform" ])
213351 repository_id = data. github_repository . repositories [each . key ]. node_id
0 commit comments