Sha256: e90ae0008c51049ff3575829b62ac3f41c72bf6d488d2f69ce167b95505ce2a0

Contents?: true

Size: 668 Bytes

Versions: 2

Compression:

Stored size: 668 Bytes

Contents

module Danger
  module CISource
    class TeamCity < CI
      def self.validates?(env)
        env.key? "TEAMCITY_VERSION"
      end

      def supported_request_sources
        @supported_request_sources ||= [Danger::RequestSources::GitHub]
      end

      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
danger-0.9.1 lib/danger/ci_source/teamcity.rb
danger-0.9.0 lib/danger/ci_source/teamcity.rb