Class: Danger::CISource::TeamCity
- Defined in:
- lib/danger/ci_source/teamcity.rb
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.
12 13 14 15 16 17 18 19 |
# File 'lib/danger/ci_source/teamcity.rb', line 12 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
4 5 6 |
# File 'lib/danger/ci_source/teamcity.rb', line 4 def self.validates?(env) env.key? 'TEAMCITY_VERSION' end |
Instance Method Details
#supported_request_sources ⇒ Object
8 9 10 |
# File 'lib/danger/ci_source/teamcity.rb', line 8 def supported_request_sources @supported_request_sources ||= [Danger::RequestSources::GitHub] end |