Method: Github::Client::PullRequests#list

Defined in:
lib/github_api/client/pull_requests.rb

#list(*args) ⇒ Object Also known as: all

List pull requests

Examples:

github = Github.new user: 'user-name', repo: 'repo-name'
github.pull_requests.list
github.pull_requests.list { |req| ... }
pulls = Github::PullRequests.new
pulls.pull_requests.list 'user-name', 'repo-name'


27
28
29
30
31
32
33
34
# File 'lib/github_api/client/pull_requests.rb', line 27

def list(*args)
  arguments(args, required: [:user, :repo])

  response = get_request("/repos/#{arguments.user}/#{arguments.repo}/pulls",
                         arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end