Module: Octokit::Client::Pulls

Included in:
Octokit::Client
Defined in:
lib/octokit/client/pulls.rb

Instance Method Summary collapse

Instance Method Details

#create_pull_request(repo, options = {}) ⇒ Object



4
5
6
# File 'lib/octokit/client/pulls.rb', line 4

def create_pull_request(repo, options={})
  post("pulls/#{Repository.new(repo)}", options)['pulls']
end

#pull_request(repo, number, options = {}) ⇒ Object Also known as: pull



13
14
15
# File 'lib/octokit/client/pulls.rb', line 13

def pull_request(repo, number, options={})
  get("pulls/#{Repository.new(repo)}/#{number}", options)['pulls']
end

#pull_requests(repo, state = 'open', options = {}) ⇒ Object Also known as: pulls



8
9
10
# File 'lib/octokit/client/pulls.rb', line 8

def pull_requests(repo, state='open', options={})
  get("pulls/#{Repository.new(repo)}/#{state}", options)['pulls']
end