add --only-team option
Change-Id: I1df59dfd024af020bd02848152296910f72c90b2 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
d25e289732
commit
f85ddd8f4d
@ -58,6 +58,12 @@ class ContributionsReportBase(lister.Lister):
|
||||
action='append',
|
||||
help='do not show stats for the named team (may be repeated)',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--only-team',
|
||||
default=[],
|
||||
action='append',
|
||||
help='only show stats for the named team (may be repeated)',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--ignore-tag',
|
||||
dest='ignore_tag',
|
||||
@ -112,6 +118,10 @@ class ContributionsReportBase(lister.Lister):
|
||||
if ignore_teams:
|
||||
data = (d for d in data if d['Team'].lower() not in ignore_teams)
|
||||
|
||||
only_teams = set(t.lower() for t in parsed_args.only_team)
|
||||
if only_teams:
|
||||
data = (d for d in data if d['Team'].lower() in only_teams)
|
||||
|
||||
if parsed_args.only_sponsors:
|
||||
sponsor_map = sponsors.Sponsors(parsed_args.sponsor_level)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user