Add tc repositories for electoral roll generation
The OpenStack TC Charter [0] states that "Active Contributors" are those that committed a change to a repository under the governance of the OpenStack Technical Committee. These repos include OpenStack projects [1] under various project teams, repositories maintained by SIGs [2] and repositories maintained by the Technical Committee [3] Add TC repos to the roll generation scripts. [0] https://governance.openstack.org/tc/reference/charter.html#voters-for-tc-seats-ac [1] https://governance.openstack.org/tc/reference/projects/index.html#projects [2] https://governance.openstack.org/tc/reference/sig-repos.html#sig-repos [3] https://governance.openstack.org/tc/reference/technical-committee-repos.html#tc-repos Change-Id: I20b14f4e2bbd805c9ebe530cbd3cded7f2cf1574
This commit is contained in:
@@ -104,6 +104,8 @@ def usage(argv=sys.argv):
|
||||
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("-t", "--tc-repos", help="Path to TC repos file",
|
||||
dest='tc_repos')
|
||||
parser.add_argument("-m", "--nonmember",
|
||||
help="include non-foundation-members in electorate",
|
||||
action="store_true")
|
||||
|
||||
@@ -39,6 +39,7 @@ def change_owners_options_proxy(after, before, ref, outdir='./', sieve=None,
|
||||
options.legacy = None
|
||||
options.projects = None
|
||||
options.sigs = None
|
||||
options.tc_repos = None
|
||||
options.verbose = 0
|
||||
options.nonmember = False
|
||||
|
||||
|
||||
@@ -136,6 +136,14 @@ def main(options):
|
||||
else:
|
||||
sigs_file = None
|
||||
|
||||
# TC repos file path
|
||||
if options.tc_repos:
|
||||
tc_repos_file = options.tc_repos
|
||||
elif 'tc_repos' in config:
|
||||
tc_repos_file = config['tc_repos']
|
||||
else:
|
||||
tc_repos_file = None
|
||||
|
||||
# Whether to omit "extra ACs"
|
||||
if options.no_extra_acs:
|
||||
no_extra_acs = options.no_extra_acs
|
||||
@@ -246,6 +254,30 @@ def main(options):
|
||||
if extra_acs:
|
||||
gov_projects['sigs']['extra-acs'].extend(extra_acs)
|
||||
|
||||
# The set of repositories managed by The Technical Committee
|
||||
if tc_repos_file:
|
||||
tc_repos = utils.load_yaml(open(tc_repos_file).read())
|
||||
elif projects_file:
|
||||
tc_repos = []
|
||||
else:
|
||||
tc_repos = utils.get_from_git('openstack/governance',
|
||||
'reference/'
|
||||
'technical-committee-repos.yaml',
|
||||
{'h': ref})
|
||||
if tc_repos:
|
||||
tc_repos = tc_repos[next(iter(tc_repos))] # drop the top key
|
||||
gov_projects['tc'] = {
|
||||
'deliverables': {
|
||||
'tc': {'repos': []},
|
||||
},
|
||||
'extra-acs': [],
|
||||
}
|
||||
for repo in tc_repos:
|
||||
gov_projects['tc']['deliverables']['tc']['repos'].append(
|
||||
repo['repo']
|
||||
)
|
||||
gov_projects['tc']['extra-acs'].extend(repo.get('extra_acs') or [])
|
||||
|
||||
# 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)
|
||||
|
||||
Reference in New Issue
Block a user