Skip to content

Commit

Permalink
Enforce that plot-to-board sets chart as cover
Browse files Browse the repository at this point in the history
`trollolo burndown --plot-to-board` only added the new chart to
the card. Trello does not always set the new attachment as the
cover. This ensures that the attachment is added as a cover.

Fix #114.
  • Loading branch information
agraul committed Sep 21, 2017
1 parent f1f1866 commit 56f9d4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Fix `plot-to-board` option in the burndown command when it is used together
with `-o`.
* `burndown --plot-to-board` always sets the burndown chart as the cover.
Fix #114.

## Version 0.0.14

Expand Down
4 changes: 3 additions & 1 deletion lib/burndown_chart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ def update(options)
board = trello.board(board_id)
name = options['output'] ? options['output'] : '.'
name += "/burndown-#{sprint.to_s.rjust(2, '0')}.png"
trello.add_attachment(board.burndown_card_id, name)
card_id = board.burndown_card_id
trello.add_attachment(card_id, name)
trello.make_cover(card_id, name)
end
end

Expand Down

0 comments on commit 56f9d4b

Please sign in to comment.