class Danger::LocalPullRequest

Attributes

pull_request_id[R]
sha[R]

Public Class Methods

new(log_line) click to toggle source
# File lib/danger/ci_source/support/local_pull_request.rb, line 5
def initialize(log_line)
  @pull_request_id = log_line.match(/#(?<id>[0-9]+)/)[:id]
  @sha = log_line.split(" ".freeze).first
end

Public Instance Methods

valid?() click to toggle source
# File lib/danger/ci_source/support/local_pull_request.rb, line 10
def valid?
  pull_request_id && sha
end