lib/danger/ci_source/travis.rb in danger-3.0.3 vs lib/danger/ci_source/travis.rb in danger-3.1.0

- old
+ new

@@ -29,10 +29,10 @@ def self.validates_as_ci?(env) env.key? "HAS_JOSH_K_SEAL_OF_APPROVAL" end def self.validates_as_pr?(env) - exists = ["TRAVIS_PULL_REQUEST", "TRAVIS_REPO_SLUG"].all? { |x| env[x] } + exists = ["TRAVIS_PULL_REQUEST", "TRAVIS_REPO_SLUG"].all? { |x| env[x] && !env[x].empty? } exists && env["TRAVIS_PULL_REQUEST"].to_i > 0 end def supported_request_sources @supported_request_sources ||= [Danger::RequestSources::GitHub]