Sha256: 206287ec2b24a1596e8735bac359717e525a19e2d0c48b1a393cb09487b5aab2

Contents?: true

Size: 572 Bytes

Versions: 16

Compression:

Stored size: 572 Bytes

Contents

# http://docs.travis-ci.com/user/osx-ci-environment/
# http://docs.travis-ci.com/user/environment-variables/

module Danger
  module CISource
    class Travis < CI
      def self.validates?(env)
        return !env["HAS_JOSH_K_SEAL_OF_APPROVAL"].nil?
      end

      def initialize(env)
        self.repo_slug = env["TRAVIS_REPO_SLUG"]
        # from https://docs.travis-ci.com/user/pull-requests, as otherwise it's "false"
        if env["TRAVIS_PULL_REQUEST"].to_i > 0
          self.pull_request_id = env["TRAVIS_PULL_REQUEST"]
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
danger-0.8.1 lib/danger/ci_source/travis.rb
danger-0.8.0 lib/danger/ci_source/travis.rb
danger-0.7.4 lib/danger/ci_source/travis.rb
danger-0.7.3 lib/danger/ci_source/travis.rb
danger-0.7.2 lib/danger/ci_source/travis.rb
danger-0.7.1 lib/danger/ci_source/travis.rb
danger-0.7.0 lib/danger/ci_source/travis.rb
danger-0.6.5 lib/danger/ci_source/travis.rb
danger-0.6.0 lib/danger/ci_source/travis.rb
danger-0.5.2 lib/danger/ci_source/travis.rb
danger-0.5.1 lib/danger/ci_source/travis.rb
danger-0.5.0 lib/danger/ci_source/travis.rb
danger-0.3.0 lib/danger/ci_source/travis.rb
danger-0.2.1 lib/danger/ci_source/travis.rb
danger-0.2.0 lib/danger/ci_source/travis.rb
danger-0.1.1 lib/danger/ci_source/travis.rb