Add extra-ATCs from sigs-repos into the electorate
Without this patch, extra-atcs that are defined in a SIG will not be
taken into consideration for electorate rolls.
This is a problem, as we intend to move i18n as a SIG, so we would
lose their atc as part of the electorate.
This fixes it by editing the spaghetti code for SIGs. It was already
simulating the structure of a project named "SIG". So it made sense
to extend it with 'extra-atcs'.
Therefore to initialise extra-atcs for SIGs, we just have to
have something like this in sigs-repos:
```
signame:
- repo: repo_location
extra-atcs:
- name: extra_atc_fullname
email: extra_atc_email
expires-in: extra_atc_expiry
comment: extra_atc_comment
```
Yes, it means that a SIG need to own a repo for this.
This is not a problem at the moment, AFAIK.
If this becomes a problem, we could think of removing the sigs-repos file,
and just make SIGs some kind of project in governance, simplifying the code.
Depends-On: https://review.opendev.org/721605
Change-Id: I5e1c42c64f5e76dafb9420aa1f3363890b1b9d65
This commit is contained in:
@@ -239,12 +239,14 @@ def main(options):
|
|||||||
for sig in sigs_repos:
|
for sig in sigs_repos:
|
||||||
for repo in sigs_repos[sig]:
|
for repo in sigs_repos[sig]:
|
||||||
if 'sigs' not in gov_projects:
|
if 'sigs' not in gov_projects:
|
||||||
gov_projects['sigs'] = {'deliverables': {}}
|
gov_projects['sigs'] = {'deliverables': {}, 'extra-atcs': []}
|
||||||
if sig not in gov_projects['sigs']['deliverables']:
|
if sig not in gov_projects['sigs']['deliverables']:
|
||||||
gov_projects['sigs']['deliverables'][sig] = {'repos': []}
|
gov_projects['sigs']['deliverables'][sig] = {'repos': []}
|
||||||
for repo in sigs_repos[sig]:
|
|
||||||
gov_projects['sigs']['deliverables'][sig]['repos'].append(
|
gov_projects['sigs']['deliverables'][sig]['repos'].append(
|
||||||
repo['repo'])
|
repo['repo'])
|
||||||
|
extra_atcs = repo.get('extra-atcs', [])
|
||||||
|
if extra_atcs:
|
||||||
|
gov_projects['sigs']['extra-atcs'].extend(extra_atcs)
|
||||||
|
|
||||||
# A cache of full repo names existing in Gerrit, used to filter out repos
|
# A cache of full repo names existing in Gerrit, used to filter out repos
|
||||||
# listed in governance which don't actually exist
|
# listed in governance which don't actually exist
|
||||||
|
|||||||
Reference in New Issue
Block a user