-
Notifications
You must be signed in to change notification settings - Fork 79
Conversation
It still doesn't support getting a raw patch for a commit? |
@mislav For raw patch, I'm thinking to achieve like this: url, _ := octokit.CommitURL.Expand(xxx)
req := client.NewRequest(url)
req.Header.Add("Accept", "application/vnd.github.v3.patch")
resp, _ := req.Get()
ioutil.ReadAll(resp.Body) // patch I'm still thinking whether we should expose it as an API to |
Making a dedicated API for this use case would be great for users because they shouldn't be concerned with implementation details of GitHub API such as custom MIME types in request. However, if you're fine with a lower-level API like you've just demonstrated, it will work for our purposes as well. |
I think I'm convinced this would be best solution for now, although it seems the patching API is only useful for very particular use case. |
On Tue, Jul 29, 2014 at 4:45 PM, Jingwen Owen Ou notifications@github.com
DO ITTT 👍 |
This API is to get a commit patch. It returns a read IO and the response result.
Looks pretty good. Perfect abstraction level for this kind of stuff. |
This is to support mislav/hub#601
/cc @mislav