lib/danger/commands/runner.rb in danger-0.8.2 vs lib/danger/commands/runner.rb in danger-0.8.3

- old
+ new

@@ -8,16 +8,20 @@ self.command = 'danger' self.version = Danger::VERSION self.plugin_prefixes = %w(claide danger) + attr_accessor :cork + def initialize(argv) dangerfile = argv.option('dangerfile', 'Dangerfile') @dangerfile_path = dangerfile if File.exist? dangerfile @base = argv.option('base') @head = argv.option('head') @danger_id = argv.option('danger_id', 'danger') + @cork = Cork::Board.new(silent: argv.option('silent', false), + verbose: argv.option('verbose', false)) super end def validate! super @@ -35,11 +39,11 @@ ].concat(super) end def run env = EnvironmentManager.new(ENV) - dm = Dangerfile.new(env) + dm = Dangerfile.new(env, cork) if dm.env.pr? dm.verbose = verbose dm.init_plugins @@ -59,10 +63,10 @@ dm.print_results ensure dm.env.clean_up end else - puts "Not a Pull Request - skipping `danger` run" + cork.puts "Not a Pull Request - skipping `danger` run" end end def post_results(dm) gh = dm.env.request_source