From f3ee30f7445549db9d499ce40b9e2f560ac185eb Mon Sep 17 00:00:00 2001 From: Ronaq13 Date: Mon, 26 Feb 2018 22:44:09 +0530 Subject: [PATCH] Added --plot-to-board to plot command This flag of plot command will send the plotted burndown chart to the first card of the `Done` column. close #134 --- lib/burndown_chart.rb | 1 + lib/cli.rb | 1 + scripts/create_burndown.py | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/burndown_chart.rb b/lib/burndown_chart.rb index d45bd39..26cad29 100644 --- a/lib/burndown_chart.rb +++ b/lib/burndown_chart.rb @@ -167,6 +167,7 @@ def process_options(hash) cli_switches << '--no-tasks' if hash['no-tasks'] cli_switches << '--with-fast-lane' if hash['with-fast-lane'] cli_switches << "--output #{hash['output']}" if hash['output'] + cli_switches << '--plot-to-board' if hash['plot-to-board'] cli_switches << '--verbose' if hash['verbose'] end end diff --git a/lib/cli.rb b/lib/cli.rb index d88a47f..e660d4b 100644 --- a/lib/cli.rb +++ b/lib/cli.rb @@ -193,6 +193,7 @@ def burndown option :output, aliases: :o, desc: 'Output directory', required: false option 'with-fast-lane', desc: 'Plot Fast Lane with new cards bars', required: false, type: :boolean option 'no-tasks', desc: 'Do not plot tasks line', required: false, type: :boolean + option 'plot-to-board', desc: 'Send the plotted chart to the first card of the Done column', required: false def plot(sprint_number) process_global_options options BurndownChart.plot(sprint_number, options) diff --git a/scripts/create_burndown.py b/scripts/create_burndown.py index b61bfbd..5da8148 100755 --- a/scripts/create_burndown.py +++ b/scripts/create_burndown.py @@ -30,6 +30,7 @@ def parseCommandLine(): parser.add_argument('--with-fast-lane', action='store_true', help='Draw line for Fast Lane cards', default=False) parser.add_argument('--verbose', action='store_true', help='Verbose Output', default=False) parser.add_argument('--no-head', action='store_true', help='Run in headless mode', default=False) + parser.add_argument('--plot-to-board', help='Send the plotted chart to first card of Done column') args = parser.parse_args() if args.output: