Class: Danger::Travis

Inherits:
Object
  • Object
show all
Defined in:
lib/danger/ci_source/travis.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Travis

Returns a new instance of Travis.



13
14
15
16
# File 'lib/danger/ci_source/travis.rb', line 13

def initialize(env)
  self.repo_slug = env["TRAVIS_REPO_SLUG"]
  self.pull_request_id = env["TRAVIS_PULL_REQUEST"]
end

Instance Attribute Details

#pull_request_idObject

Returns the value of attribute pull_request_id.



7
8
9
# File 'lib/danger/ci_source/travis.rb', line 7

def pull_request_id
  @pull_request_id
end

#repo_slugObject

Returns the value of attribute repo_slug.



7
8
9
# File 'lib/danger/ci_source/travis.rb', line 7

def repo_slug
  @repo_slug
end

Class Method Details

.validates?(env) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/danger/ci_source/travis.rb', line 9

def self.validates?(env)
  return env["HAS_JOSH_K_SEAL_OF_APPROVAL"] != nil
end