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
This commit is contained in:
Tony Breeds 2016-09-13 14:41:38 +10:00
parent 59e4294f09
commit 6f4af2b46f

View File

@ -30,6 +30,10 @@ def main():
description = ('Check if the owner of open changes are valid candidates as' description = ('Check if the owner of open changes are valid candidates as'
' described in the change') ' described in the change')
parser = argparse.ArgumentParser(description) 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, parser.add_argument('--tag', dest='tag', default=utils.PROJECTS_TAG,
help=('The governance tag to validate against. ' help=('The governance tag to validate against. '
'Default: %(default)s')) 'Default: %(default)s'))
@ -50,6 +54,7 @@ def main():
try: try:
found = check_candidacy.check_candidacy_review(review['change_id'], found = check_candidacy.check_candidacy_review(review['change_id'],
tag=args.tag, tag=args.tag,
limit=args.limit,
review=review) review=review)
except Exception as exc: except Exception as exc:
print("[E] %s\n\n" % (exc)) print("[E] %s\n\n" % (exc))