[maintain-github-mirror] Skip abandoned gov files

Following the deletion of the foundation-board-repos.yaml file,
the script failed as it was expecting it.

Remove that file from the scanned list, and make the script more
resilient in case other extra files go missing in the future (like
user-committee.yaml which should soon be cleaned up).

Change-Id: I83cff14f19a829b5e56771442ffb3a0341e82d69
This commit is contained in:
Thierry Carrez 2020-08-10 11:09:58 +02:00
parent c3b87ffee0
commit 0f12fa2d5a

View File

@ -109,11 +109,13 @@ def list_repos_in_governance(governance, org='openstack'):
repos.add(r)
extrafiles = ['sigs-repos.yaml',
'foundation-board-repos.yaml',
'technical-committee-repos.yaml',
'user-committee-repos.yaml']
for extrafile in extrafiles:
yaml_filename = os.path.join(governance, 'reference', extrafile)
if not os.path.exists(yaml_filename):
print(f'Skipping {extrafile} as it no longer exists')
continue
with open(yaml_filename, 'r') as extra_yaml:
for pname, project in yaml.safe_load(extra_yaml).items():
for r in project: