Class: OctoMerge::ListPullRequests

Inherits:
Object
  • Object
show all
Defined in:
lib/octo_merge/list_pull_requests.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo:, query:) ⇒ ListPullRequests

Returns a new instance of ListPullRequests.



5
6
7
8
# File 'lib/octo_merge/list_pull_requests.rb', line 5

def initialize(repo:, query:)
  @repo = repo
  @query = query
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



3
4
5
# File 'lib/octo_merge/list_pull_requests.rb', line 3

def query
  @query
end

#repoObject (readonly)

Returns the value of attribute repo.



3
4
5
# File 'lib/octo_merge/list_pull_requests.rb', line 3

def repo
  @repo
end

Instance Method Details

#allObject



10
11
12
# File 'lib/octo_merge/list_pull_requests.rb', line 10

def all
  @all ||= github_client.search_issues("is:open is:pr repo:#{repo} #{query}")[:items]
end