add option to count command to only show teams with open reviews

Change-Id: I3cb6c1f2464d598b2c12545c894f5c6ffdb103ec
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-12-07 10:23:41 -05:00
parent f5b0d41963
commit 2255950637
1 changed files with 13 additions and 0 deletions

View File

@ -328,6 +328,12 @@ class PatchesCount(lister.Lister):
action='store_true',
help='show less info for narrower report',
)
parser.add_argument(
'--only-open', '-o',
default=False,
action='store_true',
help='only show teams with open patches',
)
return parser
_import_subject = 'import zuul job settings from project-config'
@ -503,4 +509,11 @@ class PatchesCount(lister.Lister):
'')
)
if parsed_args.only_open:
data = [
row
for row in data
if row[1:4] != ('+', '+', '+')
]
return (columns, data)