Sha256: 509737ec35b8c264bb58aaef2a11f278e7ab528031fbdc7f726e3d76cde82199

Contents?: true

Size: 569 Bytes

Versions: 16

Compression:

Stored size: 569 Bytes

Contents

# https://buildkite.com/docs/agent/osx
# https://buildkite.com/docs/guides/environment-variables

module Danger
  module CISource
    class Buildkite < CI
      def self.validates?(env)
        return !env["BUILDKITE"].nil?
      end

      def initialize(env)
        repo = env["BUILDKITE_REPO"]
        unless repo.nil?
          repo_matches = repo.match(%r{([\/:])([^\/]+\/[^\/.]+)(?:.git)?$})
          self.repo_slug = repo_matches[2] unless repo_matches.nil?
        end

        self.pull_request_id = env["BUILDKITE_PULL_REQUEST"]
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
danger-0.8.1 lib/danger/ci_source/buildkite.rb
danger-0.8.0 lib/danger/ci_source/buildkite.rb
danger-0.7.4 lib/danger/ci_source/buildkite.rb
danger-0.7.3 lib/danger/ci_source/buildkite.rb
danger-0.7.2 lib/danger/ci_source/buildkite.rb
danger-0.7.1 lib/danger/ci_source/buildkite.rb
danger-0.7.0 lib/danger/ci_source/buildkite.rb
danger-0.6.5 lib/danger/ci_source/buildkite.rb
danger-0.6.0 lib/danger/ci_source/buildkite.rb
danger-0.5.2 lib/danger/ci_source/buildkite.rb
danger-0.5.1 lib/danger/ci_source/buildkite.rb
danger-0.5.0 lib/danger/ci_source/buildkite.rb
danger-0.3.0 lib/danger/ci_source/buildkite.rb
danger-0.2.1 lib/danger/ci_source/buildkite.rb
danger-0.2.0 lib/danger/ci_source/buildkite.rb
danger-0.1.1 lib/danger/ci_source/buildkite.rb