GitHub PullRequestReviewCommentEvent at 2014-08-18 16:05:22
Repository: boot2docker-cli
Actor: gmlewis
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/comments/16362927","id":16362927,"diff_hunk":"@@ -101,8 +102,17 @@ func getLatestReleaseName(url string) (string, error) {\n \tvar t []struct {\n \t\tTagName string `json:\"tag_name\"`\n \t}\n-\tif err := json.NewDecoder(rsp.Body).Decode(&t); err != nil {\n-\t\treturn \"\", err\n+\tbody, _ := ioutil.ReadAll(rsp.Body)\n+\n+\tif err := json.Unmarshal(body, &t); err != nil {\n+\t\tvar e struct {\n+\t\t\tMessage           string\n+\t\t\tDocumentation_url string\n+\t\t}\n+\t\tif err := json.Unmarshal(body, &e); err == nil {\n+\t\t\treturn \"\", fmt.Errorf(\"Error getting releases: %s\\n see %s\", e.Message, e.Documentation_url)","path":"util.go","position":22,"original_position":22,"commit_id":"49cd31c3f0c113e455f0e00d59d1cff1032ef430","original_commit_id":"49cd31c3f0c113e455f0e00d59d1cff1032ef430","user":{"login":"gmlewis","id":6598971,"avatar_url":"https://avatars.githubusercontent.com/u/6598971?v=2","gravatar_id":"9c3c9b916fe0e099c30fa254a42eddff","url":"https://api.github.com/users/gmlewis","html_url":"https://github.com/gmlewis","followers_url":"https://api.github.com/users/gmlewis/followers","following_url":"https://api.github.com/users/gmlewis/following{/other_user}","gists_url":"https://api.github.com/users/gmlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/gmlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmlewis/subscriptions","organizations_url":"https://api.github.com/users/gmlewis/orgs","repos_url":"https://api.github.com/users/gmlewis/repos","events_url":"https://api.github.com/users/gmlewis/events{/privacy}","received_events_url":"https://api.github.com/users/gmlewis/received_events","type":"User","site_admin":false},"body":"nit: I think it is more common to see the `err != nil` case first... but your call.","created_at":"2014-08-18T16:05:22Z","updated_at":"2014-08-18T16:05:22Z","html_url":"https://github.com/boot2docker/boot2docker-cli/pull/220#discussion_r16362927","pull_request_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220","_links":{"self":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/comments/16362927"},"html":{"href":"https://github.com/boot2docker/boot2docker-cli/pull/220#discussion_r16362927"},"pull_request":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220"}}},"pull_request":{"url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220","id":19830916,"html_url":"https://github.com/boot2docker/boot2docker-cli/pull/220","diff_url":"https://github.com/boot2docker/boot2docker-cli/pull/220.diff","patch_url":"https://github.com/boot2docker/boot2docker-cli/pull/220.patch","issue_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/220","number":220,"state":"open","locked":false,"title":"Expand the github error message - and show the JSON payload if even that...","user":{"login":"SvenDowideit","id":28492,"avatar_url":"https://avatars.githubusercontent.com/u/28492?v=2","gravatar_id":"51cc984e36eb70e812b605a56ebc0cdb","url":"https://api.github.com/users/SvenDowideit","html_url":"https://github.com/SvenDowideit","followers_url":"https://api.github.com/users/SvenDowideit/followers","following_url":"https://api.github.com/users/SvenDowideit/following{/other_user}","gists_url":"https://api.github.com/users/SvenDowideit/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenDowideit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenDowideit/subscriptions","organizations_url":"https://api.github.com/users/SvenDowideit/orgs","repos_url":"https://api.github.com/users/SvenDowideit/repos","events_url":"https://api.github.com/users/SvenDowideit/events{/privacy}","received_events_url":"https://api.github.com/users/SvenDowideit/received_events","type":"User","site_admin":false},"body":"... fails\r\n\r\nfor https://github.com/boot2docker/boot2docker/issues/481","created_at":"2014-08-15T06:12:41Z","updated_at":"2014-08-18T16:05:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f413ef39c6fb949f6982333ae9dbfcaa710757c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220/commits","review_comments_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220/comments","review_comment_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/comments/{number}","comments_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/220/comments","statuses_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/statuses/49cd31c3f0c113e455f0e00d59d1cff1032ef430","head":{"label":"SvenDowideit:show-github-error-details","ref":"show-github-error-details","sha":"49cd31c3f0c113e455f0e00d59d1cff1032ef430","user":{"login":"SvenDowideit","id":28492,"avatar_url":"https://avatars.githubusercontent.com/u/28492?v=2","gravatar_id":"51cc984e36eb70e812b605a56ebc0cdb","url":"https://api.github.com/users/SvenDowideit","html_url":"https://github.com/SvenDowideit","followers_url":"https://api.github.com/users/SvenDowideit/followers","following_url":"https://api.github.com/users/SvenDowideit/following{/other_user}","gists_url":"https://api.github.com/users/SvenDowideit/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenDowideit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenDowideit/subscriptions","organizations_url":"https://api.github.com/users/SvenDowideit/orgs","repos_url":"https://api.github.com/users/SvenDowideit/repos","events_url":"https://api.github.com/users/SvenDowideit/events{/privacy}","received_events_url":"https://api.github.com/users/SvenDowideit/received_events","type":"User","site_admin":false},"repo":{"id":17074642,"name":"boot2docker-cli","full_name":"SvenDowideit/boot2docker-cli","owner":{"login":"SvenDowideit","id":28492,"avatar_url":"https://avatars.githubusercontent.com/u/28492?v=2","gravatar_id":"51cc984e36eb70e812b605a56ebc0cdb","url":"https://api.github.com/users/SvenDowideit","html_url":"https://github.com/SvenDowideit","followers_url":"https://api.github.com/users/SvenDowideit/followers","following_url":"https://api.github.com/users/SvenDowideit/following{/other_user}","gists_url":"https://api.github.com/users/SvenDowideit/gists{/gist_id}","starred_url":"https://api.github.com/users/SvenDowideit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SvenDowideit/subscriptions","organizations_url":"https://api.github.com/users/SvenDowideit/orgs","repos_url":"https://api.github.com/users/SvenDowideit/repos","events_url":"https://api.github.com/users/SvenDowideit/events{/privacy}","received_events_url":"https://api.github.com/users/SvenDowideit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SvenDowideit/boot2docker-cli","description":"boot2docker management utility","fork":true,"url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli","forks_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/forks","keys_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/teams","hooks_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/hooks","issue_events_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/issues/events{/number}","events_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/events","assignees_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/assignees{/user}","branches_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/branches{/branch}","tags_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/tags","blobs_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/languages","stargazers_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/stargazers","contributors_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/contributors","subscribers_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/subscribers","subscription_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/subscription","commits_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/contents/{+path}","compare_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/merges","archive_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/downloads","issues_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/issues{/number}","pulls_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/labels{/name}","releases_url":"https://api.github.com/repos/SvenDowideit/boot2docker-cli/releases{/id}","created_at":"2014-02-22T00:35:11Z","updated_at":"2014-07-02T04:00:27Z","pushed_at":"2014-08-18T01:30:08Z","git_url":"git://github.com/SvenDowideit/boot2docker-cli.git","ssh_url":"git@github.com:SvenDowideit/boot2docker-cli.git","clone_url":"https://github.com/SvenDowideit/boot2docker-cli.git","svn_url":"https://github.com/SvenDowideit/boot2docker-cli","homepage":"","size":2068,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"boot2docker:master","ref":"master","sha":"ddde7162e885b8314a3e9dc576708657042ee63c","user":{"login":"boot2docker","id":6394678,"avatar_url":"https://avatars.githubusercontent.com/u/6394678?v=2","gravatar_id":"20726e136d06db4e9658816e0aeb9fbe","url":"https://api.github.com/users/boot2docker","html_url":"https://github.com/boot2docker","followers_url":"https://api.github.com/users/boot2docker/followers","following_url":"https://api.github.com/users/boot2docker/following{/other_user}","gists_url":"https://api.github.com/users/boot2docker/gists{/gist_id}","starred_url":"https://api.github.com/users/boot2docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boot2docker/subscriptions","organizations_url":"https://api.github.com/users/boot2docker/orgs","repos_url":"https://api.github.com/users/boot2docker/repos","events_url":"https://api.github.com/users/boot2docker/events{/privacy}","received_events_url":"https://api.github.com/users/boot2docker/received_events","type":"Organization","site_admin":false},"repo":{"id":17053199,"name":"boot2docker-cli","full_name":"boot2docker/boot2docker-cli","owner":{"login":"boot2docker","id":6394678,"avatar_url":"https://avatars.githubusercontent.com/u/6394678?v=2","gravatar_id":"20726e136d06db4e9658816e0aeb9fbe","url":"https://api.github.com/users/boot2docker","html_url":"https://github.com/boot2docker","followers_url":"https://api.github.com/users/boot2docker/followers","following_url":"https://api.github.com/users/boot2docker/following{/other_user}","gists_url":"https://api.github.com/users/boot2docker/gists{/gist_id}","starred_url":"https://api.github.com/users/boot2docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boot2docker/subscriptions","organizations_url":"https://api.github.com/users/boot2docker/orgs","repos_url":"https://api.github.com/users/boot2docker/repos","events_url":"https://api.github.com/users/boot2docker/events{/privacy}","received_events_url":"https://api.github.com/users/boot2docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boot2docker/boot2docker-cli","description":"boot2docker management utility","fork":false,"url":"https://api.github.com/repos/boot2docker/boot2docker-cli","forks_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/forks","keys_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/teams","hooks_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/hooks","issue_events_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/events{/number}","events_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/events","assignees_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/assignees{/user}","branches_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/branches{/branch}","tags_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/tags","blobs_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/languages","stargazers_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/stargazers","contributors_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/contributors","subscribers_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/subscribers","subscription_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/subscription","commits_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/contents/{+path}","compare_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/merges","archive_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/downloads","issues_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues{/number}","pulls_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/labels{/name}","releases_url":"https://api.github.com/repos/boot2docker/boot2docker-cli/releases{/id}","created_at":"2014-02-21T10:36:17Z","updated_at":"2014-08-18T15:48:17Z","pushed_at":"2014-08-13T22:34:56Z","git_url":"git://github.com/boot2docker/boot2docker-cli.git","ssh_url":"git@github.com:boot2docker/boot2docker-cli.git","clone_url":"https://github.com/boot2docker/boot2docker-cli.git","svn_url":"https://github.com/boot2docker/boot2docker-cli","homepage":"","size":3317,"stargazers_count":139,"watchers_count":139,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":44,"mirror_url":null,"open_issues_count":38,"forks":44,"open_issues":38,"watchers":139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220"},"html":{"href":"https://github.com/boot2docker/boot2docker-cli/pull/220"},"issue":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/220"},"comments":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/boot2docker/boot2docker-cli/statuses/49cd31c3f0c113e455f0e00d59d1cff1032ef430"}}}}