lib/danger_pronto/plugin.rb in danger-pronto-0.3.0 vs lib/danger_pronto/plugin.rb in danger-pronto-0.3.1
- old
+ new
@@ -26,10 +26,10 @@
# Executes pronto command
# @param commit [String] hash/branch/tag
# @return [Hash] Converted hash from pronto json output
def pronto(specified_commit = nil)
commit = "origin/master"
- commit = specified_commit if specified_commit.present?
+ commit = specified_commit if !specified_commit.nil?
pronto_output = `#{'bundle exec ' if File.exists?('Gemfile')}pronto run -f json -c #{commit}`
JSON.parse(pronto_output)
end
# Builds the message