Merge "Include contributors to repos for SIGs in TC rolls"

This commit is contained in:
Zuul 2019-11-21 21:33:18 +00:00 committed by Gerrit Code Review
commit 56d6173ebc
2 changed files with 30 additions and 0 deletions

View File

@ -108,6 +108,7 @@ def usage(argv=sys.argv):
parser.add_argument("-a", "--after", help="Start date for matching merges")
parser.add_argument("-b", "--before", help="End date for matching merges")
parser.add_argument("-c", "--config", help="Path to script configuration")
parser.add_argument("-g", "--sigs", help="Path to SIGs repos file")
parser.add_argument("-m", "--nonmember",
help="include non-foundation-members in electorate",
action="store_true")

View File

@ -130,6 +130,14 @@ def main(options):
else:
legacy_file = None
# SIGs projects file path
if options.sigs:
sigs_file = options.sigs
elif 'sigs' in config:
sigs_file = config['sigs']
else:
sigs_file = None
# Whether to omit "extra ATCs"
if options.no_extra_atcs:
no_extra_atcs = options.no_extra_atcs
@ -217,6 +225,27 @@ def main(options):
gov_projects[project]['deliverables'][deliverable] = \
old_projects[project]['deliverables'][deliverable]
# The set of repositories managed by special interest groups
# are added to the main dict as they're part of the technical
# committee electorate
if sigs_file:
sigs_repos = utils.load_yaml(open(sigs_file).read())
elif projects_file:
sigs_repos = []
else:
sigs_repos = utils.get_from_git('openstack/governance',
'reference/sigs-repos.yaml',
{'h': ref})
for sig in sigs_repos:
for repo in sigs_repos[sig]:
if 'sigs' not in gov_projects:
gov_projects['sigs'] = {'deliverables': {}}
if sig not in gov_projects['sigs']['deliverables']:
gov_projects['sigs']['deliverables'][sig] = {'repos': []}
for repo in sigs_repos[sig]:
gov_projects['sigs']['deliverables'][sig]['repos'].append(
repo['repo'])
# A cache of full repo names existing in Gerrit, used to filter out repos
# listed in governance which don't actually exist
ger_repos = utils.query_gerrit('projects/', verbose=options.verbose)