lib/hub/github_api.rb
# Public: Fetch a pull request's patch
Fetch a pull request's patch
Fetch a pull request ' s patch
def pullrequest_patch project, pull_id
      res = get "https://%s/repos/%s/%s/pulls/%d" %
        [api_host(project.host), project.owner, project.name, pull_id] do |req|
          req["Accept"] = "application/vnd.github.v3.patch"
        end
      res.error! unless res.success?
      res.body
    end
def pullrequest_patch project , pull_id res = get "https://%s/repos/%s/%s/pulls/%d" % [ api_host ( project . host ) , project . owner , project . name , pull_id ] do | req | req [ "Accept" ] = "application/vnd.github.v3.patch" end res . error! unless res . success? res . body end
Public: Fetch a pull request's patch
Public : Fetch a pull request ' s patch
project
pull_id