class OctoMerge::PullRequest
Attributes
number[R]
repo[R]
Public Class Methods
new(repo:, number:)
click to toggle source
# File lib/octo_merge/pull_request.rb, line 7 def initialize(repo:, number:) @repo = repo @number = number.to_s end
Public Instance Methods
==(other_pull_request)
click to toggle source
# File lib/octo_merge/pull_request.rb, line 40 def ==(other_pull_request) repo == other_pull_request.repo && number == other_pull_request.number end
body()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 36 def body github_api_result.body end
number_branch()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 28 def number_branch "pull/#{number}" end
remote()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 16 def remote github_api_result.user.login end
remote_branch()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 24 def remote_branch github_api_result.head.ref end
remote_url()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 20 def remote_url github_api_result.head.repo.ssh_url end
title()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 32 def title github_api_result.title end
url()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 12 def url github_api_result.html_url end
Private Instance Methods
github_api_result()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 46 def github_api_result @github_api_result ||= github_client.pull_request(repo, number) end
github_client()
click to toggle source
# File lib/octo_merge/pull_request.rb, line 50 def github_client OctoMerge.github_client end