Sha256: aa7ecfac49a2edb9beac36c08155207c161169c9e7f85ea9adb4a1aae4cfea36

Contents?: true

Size: 591 Bytes

Versions: 4

Compression:

Stored size: 591 Bytes

Contents

# http://github.com/surf-build/surf

module Danger
  module CISource
    # http://github.com/surf-build/surf
    class Surf < CI
      def self.validates?(env)
        return ["SURF_REPO", "SURF_NWO"].all? { |x| env[x] }
      end

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

      def initialize(env)
        self.repo_slug = env["SURF_NWO"]
        if env["SURF_PR_NUM"].to_i > 0
          self.pull_request_id = env["SURF_PR_NUM"]
        end

        self.repo_url = env["SURF_REPO"]
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
danger-2.0.1 lib/danger/ci_source/surf.rb
danger-2.0.0 lib/danger/ci_source/surf.rb
danger-0.10.1 lib/danger/ci_source/surf.rb
danger-0.10.0 lib/danger/ci_source/surf.rb