{"action":"created","issue":{"url":"https://api.github.com/repos/google/go-github/issues/891","repository_url":"https://api.github.com/repos/google/go-github","labels_url":"https://api.github.com/repos/google/go-github/issues/891/labels{/name}","comments_url":"https://api.github.com/repos/google/go-github/issues/891/comments","events_url":"https://api.github.com/repos/google/go-github/issues/891/events","html_url":"https://github.com/google/go-github/pull/891","id":313134291,"number":891,"title":"Add GitService.GetBlobRaw.","user":{"login":"dsymonds","id":31506,"avatar_url":"https://avatars2.githubusercontent.com/u/31506?v=4","gravatar_id":"","url":"https://api.github.com/users/dsymonds","html_url":"https://github.com/dsymonds","followers_url":"https://api.github.com/users/dsymonds/followers","following_url":"https://api.github.com/users/dsymonds/following{/other_user}","gists_url":"https://api.github.com/users/dsymonds/gists{/gist_id}","starred_url":"https://api.github.com/users/dsymonds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsymonds/subscriptions","organizations_url":"https://api.github.com/users/dsymonds/orgs","repos_url":"https://api.github.com/users/dsymonds/repos","events_url":"https://api.github.com/users/dsymonds/events{/privacy}","received_events_url":"https://api.github.com/users/dsymonds/received_events","type":"User","site_admin":false},"labels":[{"id":698400531,"url":"https://api.github.com/repos/google/go-github/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-11T00:33:41Z","updated_at":"2018-04-11T01:53:07Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/google/go-github/pulls/891","html_url":"https://github.com/google/go-github/pull/891","diff_url":"https://github.com/google/go-github/pull/891.diff","patch_url":"https://github.com/google/go-github/pull/891.patch"},"body":"This addresses #658.\r\n\r\nThe name isn't great (I would have preferred `GetRawBlob`), but it matches the previously added `RepositoriesService.GetCommitRaw`. Happy to switch if you'd prefer the better name and don't mind the mild inconsistency."},"comment":{"url":"https://api.github.com/repos/google/go-github/issues/comments/380301050","html_url":"https://github.com/google/go-github/pull/891#issuecomment-380301050","issue_url":"https://api.github.com/repos/google/go-github/issues/891","id":380301050,"user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars3.githubusercontent.com/u/1924134?v=4","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T01:53:07Z","updated_at":"2018-04-11T01:53:07Z","author_association":"COLLABORATOR","body":"I was hoping that this would follow the same pattern as in the previous PRs #481 and #767, but I see now that the choice of supported media types by the blob endpoints is not the same.\r\n\r\nAccording to https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests:\r\n\r\n> The Commit, Commit Comparison, and Pull Request resources support diff and patch formats:\r\n>\r\n> - diff\r\n> - patch\r\n> - sha\r\n\r\n(It's missing JSON, but it is also supported.)\r\n\r\nBut the blob endpoint are described at https://developer.github.com/v3/media/#git-blob-properties:\r\n\r\n> The following media types are allowed when getting a blob:\r\n>\r\n> - JSON\r\n> - raw\r\n\r\nI was going to suggest we have a `opt RawOptions` parameter here like in others, but this complicates things.\r\n\r\nThe reason to have a parameter like that is in case GitHub adds additional media types. If there's a `opt RawOptions`-like parameter, it's possible to add support without requiring breaking API changes.\r\n\r\nBlob endpoints currently supports only 1 non-JSON raw type, so not having an option works today. It feels like this won't change soon, but it's hard to predict with certainty...\r\n\r\nIf you think the current approach makes sense, I'm okay with this API (no `RawOptions`-like parameter), with the hope it will last for some time without needing to change. But it's not an easy call trying to predict how it'll play out."}}
{"actor":{"display_login":"shurcooL"}}