Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandatory repository ownership check #1062

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)