Fix CODEOWNERS creation in create_rpm_git_repo.py

Use the same logic as set_github_code_owners.py, which puts all code
owners on the same line.

Signed-off-by: Tu Dinh <[email protected]>
This commit is contained in:
Tu Dinh
2026-06-16 10:51:01 +00:00
parent 2ff123dbd1
commit 0615770378
+4 -3
View File
@@ -100,10 +100,11 @@ Built RPMs and source RPMs are available on https://updates.xcp-ng.org.
f.write(readme)
subprocess.check_call(['git', 'add', 'README.md'])
# create the CODEOWNERS file
content = f"* {to_gh_team(maintainer)}\n"
owners = [maintainer]
# make sure the platform team is owner of all the repositories
if maintainer != TEAM_ALIASES['platform']:
content += f"* {to_gh_team(TEAM_ALIASES['platform'])}\n"
if TEAM_ALIASES['platform'] not in owners:
owners.append(TEAM_ALIASES['platform'])
content = '* ' + ' '.join(to_gh_team(owner) for owner in owners) + '\n'
os.mkdir('.github')
with open('.github/CODEOWNERS', 'w') as f:
f.write(content)