From 6f4af2b46f61adfc9914d706e4884c6c6ea60082 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Tue, 13 Sep 2016 14:41:38 +1000 Subject: [PATCH] Add --limit to check_all_candidacies The default of only showing one validating commit/change is great for the first official. For the 2nd or later official it's hard to find unique commits to validate. Add the --limit option to make this easier. Change-Id: I37a04a16877ecebaf763b72bb040755082241bec --- openstack_election/cmds/check_all_candidacies.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openstack_election/cmds/check_all_candidacies.py b/openstack_election/cmds/check_all_candidacies.py index 4c209985..7487a7d3 100755 --- a/openstack_election/cmds/check_all_candidacies.py +++ b/openstack_election/cmds/check_all_candidacies.py @@ -30,6 +30,10 @@ def main(): description = ('Check if the owner of open changes are valid candidates as' ' described in the change') parser = argparse.ArgumentParser(description) + parser.add_argument('--limit', dest='limit', type=int, default=1, + help=('How many validating changes to report. ' + 'A negative value means report many. ' + 'Default: %(default)s')) parser.add_argument('--tag', dest='tag', default=utils.PROJECTS_TAG, help=('The governance tag to validate against. ' 'Default: %(default)s')) @@ -50,6 +54,7 @@ def main(): try: found = check_candidacy.check_candidacy_review(review['change_id'], tag=args.tag, + limit=args.limit, review=review) except Exception as exc: print("[E] %s\n\n" % (exc))