From 2255950637e6880ebac216232f0ed3ae496817d4 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 7 Dec 2018 10:23:41 -0500 Subject: [PATCH] add option to count command to only show teams with open reviews Change-Id: I3cb6c1f2464d598b2c12545c894f5c6ffdb103ec Signed-off-by: Doug Hellmann --- goal_tools/python3_first/patches.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/goal_tools/python3_first/patches.py b/goal_tools/python3_first/patches.py index a6cd3fb..94834d3 100644 --- a/goal_tools/python3_first/patches.py +++ b/goal_tools/python3_first/patches.py @@ -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)