Class: Danger::CISource::TeamCity
- Defined in:
- lib/danger/ci_source/teamcity.rb
Overview
Instance Attribute Summary
Attributes inherited from CI
#pull_request_id, #repo_slug, #repo_url
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(env) ⇒ TeamCity
constructor
A new instance of TeamCity.
- #supported_request_sources ⇒ Object
Methods inherited from CI
available_ci_sources, inherited, #supports?
Constructor Details
#initialize(env) ⇒ TeamCity
Returns a new instance of TeamCity.
13 14 15 16 17 18 19 20 |
# File 'lib/danger/ci_source/teamcity.rb', line 13 def initialize(env) # NB: Unfortunately TeamCity doesn't provide these variables # automatically so you have to add these variables manually to your # project or build configuration self.repo_slug = env["GITHUB_REPO_SLUG"] self.pull_request_id = env["GITHUB_PULL_REQUEST_ID"].to_i self.repo_url = env["GITHUB_REPO_URL"] end |
Class Method Details
.validates?(env) ⇒ Boolean
5 6 7 |
# File 'lib/danger/ci_source/teamcity.rb', line 5 def self.validates?(env) env.key? "TEAMCITY_VERSION" end |
Instance Method Details
#supported_request_sources ⇒ Object
9 10 11 |
# File 'lib/danger/ci_source/teamcity.rb', line 9 def supported_request_sources @supported_request_sources ||= [Danger::RequestSources::GitHub] end |