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-5.10.0 lib/danger/ci_source/support/local_pull_request.rb
danger-5.9.1 lib/danger/ci_source/support/local_pull_request.rb
danger-5.9.0 lib/danger/ci_source/support/local_pull_request.rb
danger-5.8.2 lib/danger/ci_source/support/local_pull_request.rb
danger-5.8.1 lib/danger/ci_source/support/local_pull_request.rb
danger-5.8.0 lib/danger/ci_source/support/local_pull_request.rb
danger-5.7.1 lib/danger/ci_source/support/local_pull_request.rb
danger-5.7.0 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.7 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.6 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.5 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.4 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.3 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.2 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.1 lib/danger/ci_source/support/local_pull_request.rb
danger-5.6.0 lib/danger/ci_source/support/local_pull_request.rb
danger-5.5.13 lib/danger/ci_source/support/local_pull_request.rb
danger-5.5.12 lib/danger/ci_source/support/local_pull_request.rb
danger-5.5.11 lib/danger/ci_source/support/local_pull_request.rb
danger-5.5.10 lib/danger/ci_source/support/local_pull_request.rb