164
164
bots:
165
165
- github: bot-wg1-a5
166
166
name: WG3 Area5 Bot
167
- config:
168
- generate_rfc0015_branch_protection_rules: true
169
167
"""
170
168
171
169
wg4_other_org = """
206
204
- cloudfoundry2/repo3
207
205
- cloudfoundry2/repo4
208
206
- cloudfoundry/repo5
209
- config:
210
- generate_rfc0015_branch_protection_rules: true
211
207
"""
212
208
213
209
toc = """
231
227
repositories:
232
228
- cloudfoundry/community
233
229
config:
234
- generate_rfc0015_branch_protection_rules: true
235
230
github_project_sync:
236
231
mapping:
237
232
cloudfoundry: 31
@@ -732,8 +727,8 @@ def test_generate_branch_protection(self):
732
727
bp_repos = o .branch_protection ["branch-protection" ]["orgs" ]["cloudfoundry" ]["repos" ]
733
728
# TOC and wg3 opted in, wg1 and wg2 not
734
729
# note: repo1..4 are shared between wg1 (opt out) and wg3 (opt in) - wg3 wins
735
- self .assertSetEqual ({f"repo{ i } " for i in range (1 , 6 )} | {"community" }, set (bp_repos .keys ()))
736
- # repo1 has static config that wins over generated branch protection rules
730
+ self .assertSetEqual ({f"repo{ i } " for i in list ( range (1 , 6 )) + [ 10 , 11 ] } | {"community" }, set (bp_repos .keys ()))
731
+ # repo1 has static config that wins over generated branch protection rulesp
737
732
self .assertTrue (bp_repos ["repo1" ]["protect" ])
738
733
self .assertNotIn ("required_pull_request_reviews" , bp_repos ["repo1" ])
739
734
@@ -749,7 +744,7 @@ def test_generate_branch_protection_multiple_orgs(self):
749
744
bp_repos = o .branch_protection ["branch-protection" ]["orgs" ]["cloudfoundry" ]["repos" ]
750
745
# TOC and wg3 opted in, wg1 and wg2 not
751
746
# note: repo1..4 are shared between wg1 (opt out) and wg3 (opt in) - wg3 wins
752
- self .assertSetEqual ({f"repo{ i } " for i in range (1 , 6 )} | {"community" }, set (bp_repos .keys ()))
747
+ self .assertSetEqual ({f"repo{ i } " for i in list ( range (1 , 6 )) + [ 10 , 11 ] } | {"community" }, set (bp_repos .keys ()))
753
748
# repo1 has static config that wins over generated branch protection rules
754
749
self .assertTrue (bp_repos ["repo1" ]["protect" ])
755
750
self .assertNotIn ("required_pull_request_reviews" , bp_repos ["repo1" ])
0 commit comments