lib/hub/github_api.rb
def commit_patch project, sha
      res = get "https://%s/repos/%s/%s/commits/%s" %
        [api_host(project.host), project.owner, project.name, sha] do |req|
          req["Accept"] = "application/vnd.github.v3.patch"
        end
      res.error! unless res.success?
      res.body
    end
# Public: Fetch the patch from a commit
Fetch the patch from a commit
Fetch the patch from a commit
def commit_patch project, sha
      res = get "https://%s/repos/%s/%s/commits/%s" %
        [api_host(project.host), project.owner, project.name, sha] do |req|
          req["Accept"] = "application/vnd.github.v3.patch"
        end
      res.error! unless res.success?
      res.body
    end
def commit_patch project , sha res = get "https://%s/repos/%s/%s/commits/%s" % [ api_host ( project . host ) , project . owner , project . name , sha ] do | req | req [ "Accept" ] = "application/vnd.github.v3.patch" end res . error! unless res . success? res . body end
Public: Fetch the patch from a commit
Public : Fetch the patch from a commit
project
sha