Sha256: 4cffa4068cbd9c1a205a43f74cc4ce0cd7b97a258a177059aa3b6f9b03737659
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
module Octokit class Client module Pulls def create_pull_request(repo, base, head, title, body, options={}) pull = { :base => base, :head => head, :title => title, :body => body, } post("/api/v2/json/pulls/#{Repository.new(repo)}", options.merge({:pull => pull}))['pulls'] end def create_pull_request_for_issue(repo, base, head, issue, options={}) pull = { :base => base, :head => head, :issue => issue } post("/api/v2/json/pulls/#{Repository.new(repo)}", options.merge({:pull => pull}))['pulls'] end def pull_requests(repo, state='open', options={}) get("/api/v2/json/pulls/#{Repository.new(repo)}/#{state}", options)['pulls'] end alias :pulls :pull_requests def pull_request(repo, number, options={}) get("/api/v2/json/pulls/#{Repository.new(repo)}/#{number}", options)['pull'] end alias :pull :pull_request end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octokit-0.6.5 | lib/octokit/client/pulls.rb |
octokit-0.6.4 | lib/octokit/client/pulls.rb |