Class: Danger::RemotePullRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/danger/ci_source/support/remote_pull_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pull_request_id, head, base) ⇒ RemotePullRequest

Returns a new instance of RemotePullRequest.



7
8
9
10
11
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 7

def initialize(pull_request_id, head, base)
  @pull_request_id = pull_request_id
  @head = head
  @base = base
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



5
6
7
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 5

def base
  @base
end

#headObject (readonly)

Returns the value of attribute head.



5
6
7
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 5

def head
  @head
end

#pull_request_idObject (readonly)

Returns the value of attribute pull_request_id.



5
6
7
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 5

def pull_request_id
  @pull_request_id
end

#shaObject (readonly)

Returns the value of attribute sha.



5
6
7
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 5

def sha
  @sha
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/danger/ci_source/support/remote_pull_request.rb', line 13

def valid?
  pull_request_id && head && base
end