Class: Danger::CISource::Drone
Instance Attribute Summary
Attributes inherited from CI
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env) ⇒ Drone
constructor
A new instance of Drone.
Constructor Details
#initialize(env) ⇒ Drone
Returns a new instance of Drone.
10 11 12 13 14 15 |
# File 'lib/danger/ci_source/drone.rb', line 10 def initialize(env) self.repo_slug = env["DRONE_REPO"] if env["DRONE_PULL_REQUEST"].to_i > 0 self.pull_request_id = env["DRONE_PULL_REQUEST"] end end |
Class Method Details
.validates?(env) ⇒ Boolean
6 7 8 |
# File 'lib/danger/ci_source/drone.rb', line 6 def self.validates?(env) return !env["DRONE"].nil? end |