Skip to content

Commit

Permalink
Mandatory repository ownership check
Browse files Browse the repository at this point in the history
- #1059 fixed the only issue
  • Loading branch information
stephanme committed Jan 29, 2025
1 parent ddca1f2 commit 268de4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions org/org_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def _kebab_case(name: str) -> str:
generator = OrgGenerator()
generator.load_from_project()
if not generator.validate_repo_ownership():
# TODO: fail on error
print("ERROR: Repository ownership is invalid.")
print("ERROR: Repository ownership is invalid. Refer to RFC-0007.")
exit(1)
generator.generate_org_members()
generator.generate_teams()
generator.generate_branch_protection()
Expand Down
6 changes: 2 additions & 4 deletions org/test_org_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,7 @@ def test_cf_org(self):
# branch protection
self.assertIn("cloudfoundry", o.branch_protection["branch-protection"]["orgs"])

# ERROR: Repository cloudfoundry/app-runtime-interfaces-infrastructure is owned by multiple WGs:
# App Runtime Interfaces, Documentation
o.validate_repo_ownership() # TODO: assertTrue when repo ownership is cleaned up
self.assertTrue(o.validate_repo_ownership())

o.generate_org_members()
members = o.org_cfg["orgs"]["cloudfoundry"]["members"]
Expand All @@ -519,4 +517,4 @@ def test_cf_org(self):

o.generate_branch_protection()
bp_repos = o.branch_protection["branch-protection"]["orgs"]["cloudfoundry"]["repos"]
self.assertGreaterEqual(len(bp_repos), 1) # TODO update after some WGs opted in
self.assertGreaterEqual(len(bp_repos), 3)

0 comments on commit 268de4a

Please sign in to comment.