lib/danger/commands/runner.rb in danger-5.5.7 vs lib/danger/commands/runner.rb in danger-5.5.8

- old
+ new

@@ -36,10 +36,11 @@ @dangerfile_path = dangerfile if File.exist?(dangerfile) @base = argv.option("base") @head = argv.option("head") @fail_on_errors = argv.option("fail-on-errors", false) @new_comment = argv.flag?("new-comment") + @remove_previous_comments = argv.flag?("remove-previous-comments") @danger_id = argv.option("danger_id", "danger") @cork = Cork::Board.new(silent: argv.option("silent", false), verbose: argv.option("verbose", false)) super end @@ -56,21 +57,23 @@ ["--base=[master|dev|stable]", "A branch/tag/commit to use as the base of the diff"], ["--head=[master|dev|stable]", "A branch/tag/commit to use as the head"], ["--fail-on-errors=<true|false>", "Should always fail the build process, defaults to false"], ["--dangerfile=<path/to/dangerfile>", "The location of your Dangerfile"], ["--danger_id=<id>", "The identifier of this Danger instance"], - ["--new-comment", "Makes Danger post a new comment instead of editing its previous one"] + ["--new-comment", "Makes Danger post a new comment instead of editing its previous one"], + ["--remove-previous-comments", "Removes all previous comment and create a new one in the end of the list"] ].concat(super) end def run Executor.new(ENV).run( base: @base, head: @head, dangerfile_path: @dangerfile_path, danger_id: @danger_id, new_comment: @new_comment, - fail_on_errors: @fail_on_errors + fail_on_errors: @fail_on_errors, + remove_previous_comments: @remove_previous_comments ) end end end