Sha256: 38b989c2bf35bb7b5cfe74152fac9d3e90323b2c4751c3a5ab4f0455f3e803f5

Contents?: true

Size: 288 Bytes

Versions: 156

Compression:

Stored size: 288 Bytes

Contents

module Danger
  class LocalPullRequest
    attr_reader :pull_request_id, :sha

    def initialize(log_line)
      @pull_request_id = log_line.match(/#(?<id>[0-9]+)/)[:id]
      @sha = log_line.split(" ".freeze).first
    end

    def valid?
      pull_request_id && sha
    end
  end
end

Version data entries

156 entries across 156 versions & 2 rubygems

Version Path
danger-9.5.1 lib/danger/ci_source/support/local_pull_request.rb
danger-9.5.0 lib/danger/ci_source/support/local_pull_request.rb
danger-9.4.3 lib/danger/ci_source/support/local_pull_request.rb
danger-9.4.2 lib/danger/ci_source/support/local_pull_request.rb
danger-9.4.1 lib/danger/ci_source/support/local_pull_request.rb
danger-9.4.0 lib/danger/ci_source/support/local_pull_request.rb
danger-9.3.2 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.36 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.35 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.34 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.33 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.32 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.31 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.30 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.29 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.28 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.27 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.26 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.25 lib/danger/ci_source/support/local_pull_request.rb
danger-additional-logging-0.0.24 lib/danger/ci_source/support/local_pull_request.rb