{"action":"created","comment":{"url":"https://api.github.com/repos/toddproject/todd/pulls/comments/90023511","pull_request_review_id":10549000,"id":90023511,"diff_hunk":"@@ -72,19 +72,18 @@ func (dat DownloadAssetTask) downloadAsset(url, directory string) error {\n \t// TODO: What if this already exists? Consider checking file existence first with io.IsExist?\n \toutput, err := dat.Fs.Create(fileName)\n \tif err != nil {\n-\t\treturn errors.New(fmt.Sprintf(\"Error while creating\", fileName, \"-\", err))\n+\t\treturn fmt.Errorf(\"Error while creating %s - %v\", fileName, err)\n \t}\n \tdefer output.Close()\n \n \tresponse, err := dat.HTTPClient.Get(url)\n-\tdefer response.Body.Close()\n \tif err != nil || response.StatusCode != 200 {\n-\n \t\t// If we have a problem retrieving the testlet, we want to return immediately,\n \t\t// instead of writing an empty file to disk\n-\t\tlog.Error(fmt.Sprintf(\"Error while downloading '%s': %s\", url, response.Status))\n+\t\tlog.Errorf(\"Error while downloading '%s': %s\", url, response.Status)\n \t\treturn err\n \t}\n+\tdefer response.Body.Close()","path":"agent/tasks/downloadasset.go","position":46,"original_position":46,"commit_id":"9058936870cfdbb98a07f6020b1d0ae8c39ac7c7","original_commit_id":"5e4b520a541ca6bbd3d1da726b4e043f1e3af51b","user":{"login":"Mierdin","id":4230395,"avatar_url":"https://avatars.githubusercontent.com/u/4230395?v=3","gravatar_id":"","url":"https://api.github.com/users/Mierdin","html_url":"https://github.com/Mierdin","followers_url":"https://api.github.com/users/Mierdin/followers","following_url":"https://api.github.com/users/Mierdin/following{/other_user}","gists_url":"https://api.github.com/users/Mierdin/gists{/gist_id}","starred_url":"https://api.github.com/users/Mierdin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mierdin/subscriptions","organizations_url":"https://api.github.com/users/Mierdin/orgs","repos_url":"https://api.github.com/users/Mierdin/repos","events_url":"https://api.github.com/users/Mierdin/events{/privacy}","received_events_url":"https://api.github.com/users/Mierdin/received_events","type":"User","site_admin":false},"body":"Ah, understood, that makes sense. Yeah if it's not too much trouble, having the two checks in this branch would be useful","created_at":"2016-11-29T14:52:10Z","updated_at":"2016-11-29T14:52:10Z","html_url":"https://github.com/toddproject/todd/pull/124#discussion_r90023511","pull_request_url":"https://api.github.com/repos/toddproject/todd/pulls/124","_links":{"self":{"href":"https://api.github.com/repos/toddproject/todd/pulls/comments/90023511"},"html":{"href":"https://github.com/toddproject/todd/pull/124#discussion_r90023511"},"pull_request":{"href":"https://api.github.com/repos/toddproject/todd/pulls/124"}}},"pull_request":{"url":"https://api.github.com/repos/toddproject/todd/pulls/124","id":95350869,"html_url":"https://github.com/toddproject/todd/pull/124","diff_url":"https://github.com/toddproject/todd/pull/124.diff","patch_url":"https://github.com/toddproject/todd/pull/124.patch","issue_url":"https://api.github.com/repos/toddproject/todd/issues/124","number":124,"state":"open","locked":false,"title":"Clean up linting warnings","user":{"login":"vcabbage","id":10789027,"avatar_url":"https://avatars.githubusercontent.com/u/10789027?v=3","gravatar_id":"","url":"https://api.github.com/users/vcabbage","html_url":"https://github.com/vcabbage","followers_url":"https://api.github.com/users/vcabbage/followers","following_url":"https://api.github.com/users/vcabbage/following{/other_user}","gists_url":"https://api.github.com/users/vcabbage/gists{/gist_id}","starred_url":"https://api.github.com/users/vcabbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcabbage/subscriptions","organizations_url":"https://api.github.com/users/vcabbage/orgs","repos_url":"https://api.github.com/users/vcabbage/repos","events_url":"https://api.github.com/users/vcabbage/events{/privacy}","received_events_url":"https://api.github.com/users/vcabbage/received_events","type":"User","site_admin":false},"body":"Mostly removes underscores from variable names and capitalizing acronyms, along with a handful of other fixes.\r\n\r\nAlso added a few TODOs for items that may need fixing but aren't directly related to linting warnings.","created_at":"2016-11-25T22:18:12Z","updated_at":"2016-11-29T14:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76006f269acd14c629937645f3d254c4a41b894d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/toddproject/todd/pulls/124/commits","review_comments_url":"https://api.github.com/repos/toddproject/todd/pulls/124/comments","review_comment_url":"https://api.github.com/repos/toddproject/todd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/toddproject/todd/issues/124/comments","statuses_url":"https://api.github.com/repos/toddproject/todd/statuses/9058936870cfdbb98a07f6020b1d0ae8c39ac7c7","head":{"label":"vcabbage:linting-cleanup","ref":"linting-cleanup","sha":"9058936870cfdbb98a07f6020b1d0ae8c39ac7c7","user":{"login":"vcabbage","id":10789027,"avatar_url":"https://avatars.githubusercontent.com/u/10789027?v=3","gravatar_id":"","url":"https://api.github.com/users/vcabbage","html_url":"https://github.com/vcabbage","followers_url":"https://api.github.com/users/vcabbage/followers","following_url":"https://api.github.com/users/vcabbage/following{/other_user}","gists_url":"https://api.github.com/users/vcabbage/gists{/gist_id}","starred_url":"https://api.github.com/users/vcabbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcabbage/subscriptions","organizations_url":"https://api.github.com/users/vcabbage/orgs","repos_url":"https://api.github.com/users/vcabbage/repos","events_url":"https://api.github.com/users/vcabbage/events{/privacy}","received_events_url":"https://api.github.com/users/vcabbage/received_events","type":"User","site_admin":false},"repo":{"id":53991243,"name":"todd","full_name":"vcabbage/todd","owner":{"login":"vcabbage","id":10789027,"avatar_url":"https://avatars.githubusercontent.com/u/10789027?v=3","gravatar_id":"","url":"https://api.github.com/users/vcabbage","html_url":"https://github.com/vcabbage","followers_url":"https://api.github.com/users/vcabbage/followers","following_url":"https://api.github.com/users/vcabbage/following{/other_user}","gists_url":"https://api.github.com/users/vcabbage/gists{/gist_id}","starred_url":"https://api.github.com/users/vcabbage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcabbage/subscriptions","organizations_url":"https://api.github.com/users/vcabbage/orgs","repos_url":"https://api.github.com/users/vcabbage/repos","events_url":"https://api.github.com/users/vcabbage/events{/privacy}","received_events_url":"https://api.github.com/users/vcabbage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vcabbage/todd","description":"A highly extensible framework for distributed capacity and connectivity testing (Testing on Demand....Distributed!)","fork":true,"url":"https://api.github.com/repos/vcabbage/todd","forks_url":"https://api.github.com/repos/vcabbage/todd/forks","keys_url":"https://api.github.com/repos/vcabbage/todd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vcabbage/todd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vcabbage/todd/teams","hooks_url":"https://api.github.com/repos/vcabbage/todd/hooks","issue_events_url":"https://api.github.com/repos/vcabbage/todd/issues/events{/number}","events_url":"https://api.github.com/repos/vcabbage/todd/events","assignees_url":"https://api.github.com/repos/vcabbage/todd/assignees{/user}","branches_url":"https://api.github.com/repos/vcabbage/todd/branches{/branch}","tags_url":"https://api.github.com/repos/vcabbage/todd/tags","blobs_url":"https://api.github.com/repos/vcabbage/todd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vcabbage/todd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vcabbage/todd/git/refs{/sha}","trees_url":"https://api.github.com/repos/vcabbage/todd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vcabbage/todd/statuses/{sha}","languages_url":"https://api.github.com/repos/vcabbage/todd/languages","stargazers_url":"https://api.github.com/repos/vcabbage/todd/stargazers","contributors_url":"https://api.github.com/repos/vcabbage/todd/contributors","subscribers_url":"https://api.github.com/repos/vcabbage/todd/subscribers","subscription_url":"https://api.github.com/repos/vcabbage/todd/subscription","commits_url":"https://api.github.com/repos/vcabbage/todd/commits{/sha}","git_commits_url":"https://api.github.com/repos/vcabbage/todd/git/commits{/sha}","comments_url":"https://api.github.com/repos/vcabbage/todd/comments{/number}","issue_comment_url":"https://api.github.com/repos/vcabbage/todd/issues/comments{/number}","contents_url":"https://api.github.com/repos/vcabbage/todd/contents/{+path}","compare_url":"https://api.github.com/repos/vcabbage/todd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vcabbage/todd/merges","archive_url":"https://api.github.com/repos/vcabbage/todd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vcabbage/todd/downloads","issues_url":"https://api.github.com/repos/vcabbage/todd/issues{/number}","pulls_url":"https://api.github.com/repos/vcabbage/todd/pulls{/number}","milestones_url":"https://api.github.com/repos/vcabbage/todd/milestones{/number}","notifications_url":"https://api.github.com/repos/vcabbage/todd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vcabbage/todd/labels{/name}","releases_url":"https://api.github.com/repos/vcabbage/todd/releases{/id}","deployments_url":"https://api.github.com/repos/vcabbage/todd/deployments","created_at":"2016-03-16T01:32:26Z","updated_at":"2016-03-16T01:32:27Z","pushed_at":"2016-11-27T23:27:35Z","git_url":"git://github.com/vcabbage/todd.git","ssh_url":"git@github.com:vcabbage/todd.git","clone_url":"https://github.com/vcabbage/todd.git","svn_url":"https://github.com/vcabbage/todd","homepage":null,"size":7085,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"toddproject:master","ref":"master","sha":"97ff88985ac26f97ab12631f872b078a3b15c406","user":{"login":"toddproject","id":21033436,"avatar_url":"https://avatars.githubusercontent.com/u/21033436?v=3","gravatar_id":"","url":"https://api.github.com/users/toddproject","html_url":"https://github.com/toddproject","followers_url":"https://api.github.com/users/toddproject/followers","following_url":"https://api.github.com/users/toddproject/following{/other_user}","gists_url":"https://api.github.com/users/toddproject/gists{/gist_id}","starred_url":"https://api.github.com/users/toddproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddproject/subscriptions","organizations_url":"https://api.github.com/users/toddproject/orgs","repos_url":"https://api.github.com/users/toddproject/repos","events_url":"https://api.github.com/users/toddproject/events{/privacy}","received_events_url":"https://api.github.com/users/toddproject/received_events","type":"Organization","site_admin":false},"repo":{"id":53824369,"name":"todd","full_name":"toddproject/todd","owner":{"login":"toddproject","id":21033436,"avatar_url":"https://avatars.githubusercontent.com/u/21033436?v=3","gravatar_id":"","url":"https://api.github.com/users/toddproject","html_url":"https://github.com/toddproject","followers_url":"https://api.github.com/users/toddproject/followers","following_url":"https://api.github.com/users/toddproject/following{/other_user}","gists_url":"https://api.github.com/users/toddproject/gists{/gist_id}","starred_url":"https://api.github.com/users/toddproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddproject/subscriptions","organizations_url":"https://api.github.com/users/toddproject/orgs","repos_url":"https://api.github.com/users/toddproject/repos","events_url":"https://api.github.com/users/toddproject/events{/privacy}","received_events_url":"https://api.github.com/users/toddproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toddproject/todd","description":"A highly extensible framework for distributed capacity and connectivity testing (Testing on Demand....Distributed!)","fork":false,"url":"https://api.github.com/repos/toddproject/todd","forks_url":"https://api.github.com/repos/toddproject/todd/forks","keys_url":"https://api.github.com/repos/toddproject/todd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toddproject/todd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toddproject/todd/teams","hooks_url":"https://api.github.com/repos/toddproject/todd/hooks","issue_events_url":"https://api.github.com/repos/toddproject/todd/issues/events{/number}","events_url":"https://api.github.com/repos/toddproject/todd/events","assignees_url":"https://api.github.com/repos/toddproject/todd/assignees{/user}","branches_url":"https://api.github.com/repos/toddproject/todd/branches{/branch}","tags_url":"https://api.github.com/repos/toddproject/todd/tags","blobs_url":"https://api.github.com/repos/toddproject/todd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toddproject/todd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toddproject/todd/git/refs{/sha}","trees_url":"https://api.github.com/repos/toddproject/todd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toddproject/todd/statuses/{sha}","languages_url":"https://api.github.com/repos/toddproject/todd/languages","stargazers_url":"https://api.github.com/repos/toddproject/todd/stargazers","contributors_url":"https://api.github.com/repos/toddproject/todd/contributors","subscribers_url":"https://api.github.com/repos/toddproject/todd/subscribers","subscription_url":"https://api.github.com/repos/toddproject/todd/subscription","commits_url":"https://api.github.com/repos/toddproject/todd/commits{/sha}","git_commits_url":"https://api.github.com/repos/toddproject/todd/git/commits{/sha}","comments_url":"https://api.github.com/repos/toddproject/todd/comments{/number}","issue_comment_url":"https://api.github.com/repos/toddproject/todd/issues/comments{/number}","contents_url":"https://api.github.com/repos/toddproject/todd/contents/{+path}","compare_url":"https://api.github.com/repos/toddproject/todd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toddproject/todd/merges","archive_url":"https://api.github.com/repos/toddproject/todd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toddproject/todd/downloads","issues_url":"https://api.github.com/repos/toddproject/todd/issues{/number}","pulls_url":"https://api.github.com/repos/toddproject/todd/pulls{/number}","milestones_url":"https://api.github.com/repos/toddproject/todd/milestones{/number}","notifications_url":"https://api.github.com/repos/toddproject/todd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toddproject/todd/labels{/name}","releases_url":"https://api.github.com/repos/toddproject/todd/releases{/id}","deployments_url":"https://api.github.com/repos/toddproject/todd/deployments","created_at":"2016-03-14T03:32:32Z","updated_at":"2016-11-29T14:13:36Z","pushed_at":"2016-11-27T18:37:59Z","git_url":"git://github.com/toddproject/todd.git","ssh_url":"git@github.com:toddproject/todd.git","clone_url":"https://github.com/toddproject/todd.git","svn_url":"https://github.com/toddproject/todd","homepage":null,"size":8517,"stargazers_count":135,"watchers_count":135,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":52,"forks":15,"open_issues":52,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/toddproject/todd/pulls/124"},"html":{"href":"https://github.com/toddproject/todd/pull/124"},"issue":{"href":"https://api.github.com/repos/toddproject/todd/issues/124"},"comments":{"href":"https://api.github.com/repos/toddproject/todd/issues/124/comments"},"review_comments":{"href":"https://api.github.com/repos/toddproject/todd/pulls/124/comments"},"review_comment":{"href":"https://api.github.com/repos/toddproject/todd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/toddproject/todd/pulls/124/commits"},"statuses":{"href":"https://api.github.com/repos/toddproject/todd/statuses/9058936870cfdbb98a07f6020b1d0ae8c39ac7c7"}}}}
{"actor":{"display_login":"Mierdin"}}