diff options
author | Tom Gall <tom.gall@linaro.org> | 2015-05-15 15:52:18 -0500 |
---|---|---|
committer | Tom Gall <tom.gall@linaro.org> | 2015-05-15 15:52:18 -0500 |
commit | 15ff988b65dfb143ef9c8200e491dc7972601882 (patch) | |
tree | d162ec4faf4c60cba35e100a46362d2cd7ee4927 | |
parent | 196b912cc2092b93e3813663ae078bb2f26ce635 (diff) |
change -t option and use of "team" name to -c for component and
universally s/team/component/ for all uses.
Remove default LSK component setting
Fail and raise error if component is not set.
-rwxr-xr-x | monthly-report.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/monthly-report.py b/monthly-report.py index f93da4c..65692a5 100755 --- a/monthly-report.py +++ b/monthly-report.py @@ -86,7 +86,7 @@ def setup_args_parser(): description = "Walk through the Cards and generate some metrics" parser = argparse.ArgumentParser(description=description) parser.add_argument("-d", "--debug", action="store_true") - parser.add_argument("-t", "--team", required=True, help="Team / Jira Project") + parser.add_argument("-c", "--component", required=True, help="Jira Component") return parser.parse_args() @@ -163,15 +163,13 @@ def walkcards(): if jira is None: sys.exit(1) - #default jira project= LSK - team = 'LSK' - if args.team is not None: - team = args.team + if args.component is None: + raise JiraComponentError('You need to specify a jira component') #Initialize dictionaries that will be used to store cards db = [] - basequery = ' project = card AND component = ' + team - if team == 'LAVA': + basequery = ' project = card AND component = ' + args.component + if args.component == 'LAVA': #LAVA monthly report is built from EPIC updates basequery += ' AND summary ~ epic ' else: @@ -191,7 +189,7 @@ def walkcards(): week = str(datetime.datetime.now().isocalendar()[1]) year = str(datetime.datetime.now().isocalendar()[0]) - filename = 'MonthlyReport-' + team + '_week-' + year + '_' + week + '.html' + filename = 'MonthlyReport-' + args.component + '_week-' + year + '_' + week + '.html' logger.info('Report saved in [' + filename + ']') outfile = open(filename, 'w') |