Module: Octokit::Client::Pulls
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/pulls.rb
Instance Method Summary collapse
- #create_pull_request(repo, base, head, title, body, options = {}) ⇒ Object
- #pull_request(repo, number, options = {}) ⇒ Object (also: #pull)
- #pull_requests(repo, state = 'open', options = {}) ⇒ Object (also: #pulls)
Instance Method Details
#create_pull_request(repo, base, head, title, body, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/octokit/client/pulls.rb', line 4 def create_pull_request(repo, base, head, title, body, ={}) pull = { :base => base, :head => head, :title => title, :body => body, } post("pulls/#{Repository.new(repo)}", .merge({:pull => pull}))['pulls'] end |
#pull_request(repo, number, options = {}) ⇒ Object Also known as: pull
19 20 21 |
# File 'lib/octokit/client/pulls.rb', line 19 def pull_request(repo, number, ={}) get("pulls/#{Repository.new(repo)}/#{number}", )['pull'] end |
#pull_requests(repo, state = 'open', options = {}) ⇒ Object Also known as: pulls
14 15 16 |
# File 'lib/octokit/client/pulls.rb', line 14 def pull_requests(repo, state='open', ={}) get("pulls/#{Repository.new(repo)}/#{state}", )['pulls'] end |