8 Commits

Author SHA1 Message Date
Tony Breeds
d7645d2a8e Lookup gerrit username and use that for looking for changes
In the situation that a candidate has registered an email address with
the Foundation and that address is a secondary address in gerrit we'll
fail to fin any validating changes.

So fix that by finding an account that matches the email address under
review and use that gerrit account for looking for change owners.

Change-Id: I588463e5527c4ebfd24dc8f0d94d56d18f5d5673
2018-07-31 10:03:48 +10:00
Tristan Cacqueray
df232c3074 Refactor all parameters to configuration.yaml
This change moves parameter from utils.py and index.rst to the
configuration.yaml. Moreover this change does:

* Use ISO 8601 dateformat in configuration
* Change events extension to use datetime instead of calendar
* Add a configuration extension to render doc substitutions

Change-Id: Ie35cb9ae2c334814afaa36b3afd606c8bcf62616
2016-11-09 03:24:26 +00:00
Tony Breeds
7da752110a Switch to hacking and fix errors
./doc/source/_exts/candidates.py:20:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./doc/source/_exts/events.py:17:1: H306  imports not in alphabetical order (os, calendar)
./doc/source/_exts/events.py:21:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./openstack_election/check_candidacy.py:62:29: E126 continuation line over-indented for hanging indent
./openstack_election/utils.py:27:1: H306  imports not in alphabetical order (yaml, re)
./openstack_election/cmds/close_election.py:90:9: H232  Python 3.x incompatible octal 755 should be written as 0o755
./openstack_election/tests/test_utils.py:25:21: E126 continuation line over-indented for hanging indent
./tools/new-election.py:18:31: H301  one import per line
./tools/new-election.py:27:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:31:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:41:5: H233  Python 3.x incompatible use of print operator

Co-Authored-By: Nguyen Hung Phuong <phuongnh@vn.fujitsu.com>
Change-Id: Idd9bc1f1f92da1658e6da2af588c575ee0ba2cb0
2016-10-07 13:35:46 +11:00
Tristan Cacqueray
6698ffe6a4 Use gerrit fullname in list rendering
This change improves candidate list rendering using gerrit to retrieve fullname.
The list rendering now uses the openstack_election libraries and some part
have been refactored accordingly.

Change-Id: Iccba3e4c529740758323b51548a2144fc7c77879
2016-09-12 08:37:13 +00:00
Tristan Cacqueray
9d96997e72 Use cgit link for candidacy approval proof
There seems to be an issue when pasting full review link with ChangeId so let's
use cgit instead. Moreover it's more simple and lightweight to check like that.

Change-Id: Ic14f9edbd25bb56f17798c365b2e636d1a8fd452
2016-09-12 07:41:49 +00:00
Tony Breeds
437e0d19fc Add check-manual for checking a candidate *without* an open review
Change-Id: I869aa412e90170fe5cc7d317c081fd19d38b5989
2016-09-12 07:41:49 +00:00
Tony Breeds
a4b6bdbd23 fix Stable branch maintenance
There are a couple of problems with the way Stable branch maintenance is
validated:
1. Any change in any repo, regardless of branch is accepted
2. The the key name is incorrect.  (it's 'maintenance' not 'Maintenance')

Correct the key name, and given it needs to specify the branch make it
specific to Stable branch maintenance.

Change-Id: I5d7bb4eab433766c2848c77f7cc4e1f502c0c97c
2016-09-12 15:35:52 +10:00
Tony Breeds
b285d3dd9c Make openstack_election look more like a python module
Currently the code in this repo is half modular have series of scripts.
Migrate the code to be more modular.  The main benefit to this is
testing is easier.

Testing is added in a followup patch

Change-Id: Ic1262436147ecdb818ee259e2e85fca8df09d722
2016-09-12 15:35:40 +10:00