{"action":"created","comment":{"url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/comments/71703164","id":71703164,"diff_hunk":"@@ -53,12 +53,29 @@ function main(params) {\n \n     request(options, function(error, response, body) {\n       if (error) {\n-        whisk.error();\n+        whisk.error({\n+          response: response,\n+          error: error,\n+          body: body\n+        });\n+      } else {\n+        console.log(\"Status code: \" + response.statusCode);\n+\n+        if(response.statusCode >= 400) {\n+          console.log(\"Response from Github: \" + body);\n+          whisk.error({\n+            statusCode: response.statusCode,\n+            response: body\n+          });\n+        } else {\n+          whisk.done({response: body});\n+        }\n       }\n-      console.log(\"Status code: \" + response.statusCode);\n-      whisk.done({response: body});\n     });\n+\n     return whisk.async();","path":"catalog/github/webhook.js","position":57,"original_position":27,"commit_id":"3bdfd04ed982b23f10f008f20a5eb26d168321b2","original_commit_id":"b31cfcad766eb1ca93434ad7d5312053a8498f7c","user":{"login":"psuter","id":245547,"avatar_url":"https://avatars.githubusercontent.com/u/245547?v=3","gravatar_id":"","url":"https://api.github.com/users/psuter","html_url":"https://github.com/psuter","followers_url":"https://api.github.com/users/psuter/followers","following_url":"https://api.github.com/users/psuter/following{/other_user}","gists_url":"https://api.github.com/users/psuter/gists{/gist_id}","starred_url":"https://api.github.com/users/psuter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psuter/subscriptions","organizations_url":"https://api.github.com/users/psuter/orgs","repos_url":"https://api.github.com/users/psuter/repos","events_url":"https://api.github.com/users/psuter/events{/privacy}","received_events_url":"https://api.github.com/users/psuter/received_events","type":"User","site_admin":false},"body":"I feel bad for asking, given how long I've left this open, but could we use a `Promise`? I think we're already operating internally with the mental model that `.async()` and friends are on their way to being marked deprecated?","created_at":"2016-07-21T13:21:13Z","updated_at":"2016-07-21T13:21:13Z","html_url":"https://github.com/openwhisk/openwhisk/pull/893#discussion_r71703164","pull_request_url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893","_links":{"self":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/comments/71703164"},"html":{"href":"https://github.com/openwhisk/openwhisk/pull/893#discussion_r71703164"},"pull_request":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893"}}},"pull_request":{"url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893","id":77515296,"html_url":"https://github.com/openwhisk/openwhisk/pull/893","diff_url":"https://github.com/openwhisk/openwhisk/pull/893.diff","patch_url":"https://github.com/openwhisk/openwhisk/pull/893.patch","issue_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/893","number":893,"state":"open","locked":false,"title":"Github webhook enhancements","user":{"login":"bjustin-ibm","id":7012682,"avatar_url":"https://avatars.githubusercontent.com/u/7012682?v=3","gravatar_id":"","url":"https://api.github.com/users/bjustin-ibm","html_url":"https://github.com/bjustin-ibm","followers_url":"https://api.github.com/users/bjustin-ibm/followers","following_url":"https://api.github.com/users/bjustin-ibm/following{/other_user}","gists_url":"https://api.github.com/users/bjustin-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/bjustin-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjustin-ibm/subscriptions","organizations_url":"https://api.github.com/users/bjustin-ibm/orgs","repos_url":"https://api.github.com/users/bjustin-ibm/repos","events_url":"https://api.github.com/users/bjustin-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/bjustin-ibm/received_events","type":"User","site_admin":false},"body":"Resolves #886 #910 \r\n\r\nCall `whisk.error()` with the actual error object received.\r\nCall `whisk.error()` when the status code from Github is something other than `200`.\r\n\r\nAllow the `repository` parameter to optionally be specified as `<organization>`/`<repoName>` so that it can be used to track repositories that aren't directly owned by the user.","created_at":"2016-07-14T19:53:55Z","updated_at":"2016-07-21T13:21:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04718e33fcbd50b65c7e10ebbe925c8382533569","assignee":{"login":"psuter","id":245547,"avatar_url":"https://avatars.githubusercontent.com/u/245547?v=3","gravatar_id":"","url":"https://api.github.com/users/psuter","html_url":"https://github.com/psuter","followers_url":"https://api.github.com/users/psuter/followers","following_url":"https://api.github.com/users/psuter/following{/other_user}","gists_url":"https://api.github.com/users/psuter/gists{/gist_id}","starred_url":"https://api.github.com/users/psuter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psuter/subscriptions","organizations_url":"https://api.github.com/users/psuter/orgs","repos_url":"https://api.github.com/users/psuter/repos","events_url":"https://api.github.com/users/psuter/events{/privacy}","received_events_url":"https://api.github.com/users/psuter/received_events","type":"User","site_admin":false},"assignees":[{"login":"psuter","id":245547,"avatar_url":"https://avatars.githubusercontent.com/u/245547?v=3","gravatar_id":"","url":"https://api.github.com/users/psuter","html_url":"https://github.com/psuter","followers_url":"https://api.github.com/users/psuter/followers","following_url":"https://api.github.com/users/psuter/following{/other_user}","gists_url":"https://api.github.com/users/psuter/gists{/gist_id}","starred_url":"https://api.github.com/users/psuter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psuter/subscriptions","organizations_url":"https://api.github.com/users/psuter/orgs","repos_url":"https://api.github.com/users/psuter/repos","events_url":"https://api.github.com/users/psuter/events{/privacy}","received_events_url":"https://api.github.com/users/psuter/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893/commits","review_comments_url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893/comments","review_comment_url":"https://api.github.com/repos/openwhisk/openwhisk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/893/comments","statuses_url":"https://api.github.com/repos/openwhisk/openwhisk/statuses/3bdfd04ed982b23f10f008f20a5eb26d168321b2","head":{"label":"bjustin-ibm:GithubWebhook","ref":"GithubWebhook","sha":"3bdfd04ed982b23f10f008f20a5eb26d168321b2","user":{"login":"bjustin-ibm","id":7012682,"avatar_url":"https://avatars.githubusercontent.com/u/7012682?v=3","gravatar_id":"","url":"https://api.github.com/users/bjustin-ibm","html_url":"https://github.com/bjustin-ibm","followers_url":"https://api.github.com/users/bjustin-ibm/followers","following_url":"https://api.github.com/users/bjustin-ibm/following{/other_user}","gists_url":"https://api.github.com/users/bjustin-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/bjustin-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjustin-ibm/subscriptions","organizations_url":"https://api.github.com/users/bjustin-ibm/orgs","repos_url":"https://api.github.com/users/bjustin-ibm/repos","events_url":"https://api.github.com/users/bjustin-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/bjustin-ibm/received_events","type":"User","site_admin":false},"repo":{"id":56602690,"name":"openwhisk","full_name":"bjustin-ibm/openwhisk","owner":{"login":"bjustin-ibm","id":7012682,"avatar_url":"https://avatars.githubusercontent.com/u/7012682?v=3","gravatar_id":"","url":"https://api.github.com/users/bjustin-ibm","html_url":"https://github.com/bjustin-ibm","followers_url":"https://api.github.com/users/bjustin-ibm/followers","following_url":"https://api.github.com/users/bjustin-ibm/following{/other_user}","gists_url":"https://api.github.com/users/bjustin-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/bjustin-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjustin-ibm/subscriptions","organizations_url":"https://api.github.com/users/bjustin-ibm/orgs","repos_url":"https://api.github.com/users/bjustin-ibm/repos","events_url":"https://api.github.com/users/bjustin-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/bjustin-ibm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bjustin-ibm/openwhisk","description":"OpenWhisk is a cloud-first distributed event-based programming service.","fork":true,"url":"https://api.github.com/repos/bjustin-ibm/openwhisk","forks_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/forks","keys_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/teams","hooks_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/hooks","issue_events_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/issues/events{/number}","events_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/events","assignees_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/assignees{/user}","branches_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/branches{/branch}","tags_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/tags","blobs_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/statuses/{sha}","languages_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/languages","stargazers_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/stargazers","contributors_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/contributors","subscribers_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/subscribers","subscription_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/subscription","commits_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/contents/{+path}","compare_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/merges","archive_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/downloads","issues_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/issues{/number}","pulls_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/pulls{/number}","milestones_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/milestones{/number}","notifications_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/labels{/name}","releases_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/releases{/id}","deployments_url":"https://api.github.com/repos/bjustin-ibm/openwhisk/deployments","created_at":"2016-04-19T14:13:34Z","updated_at":"2016-04-19T14:13:35Z","pushed_at":"2016-07-18T20:21:06Z","git_url":"git://github.com/bjustin-ibm/openwhisk.git","ssh_url":"git@github.com:bjustin-ibm/openwhisk.git","clone_url":"https://github.com/bjustin-ibm/openwhisk.git","svn_url":"https://github.com/bjustin-ibm/openwhisk","homepage":"","size":41652,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openwhisk:master","ref":"master","sha":"3f1a90c3f6f679091860bbf77d4741dfc163c2b9","user":{"login":"openwhisk","id":16900235,"avatar_url":"https://avatars.githubusercontent.com/u/16900235?v=3","gravatar_id":"","url":"https://api.github.com/users/openwhisk","html_url":"https://github.com/openwhisk","followers_url":"https://api.github.com/users/openwhisk/followers","following_url":"https://api.github.com/users/openwhisk/following{/other_user}","gists_url":"https://api.github.com/users/openwhisk/gists{/gist_id}","starred_url":"https://api.github.com/users/openwhisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwhisk/subscriptions","organizations_url":"https://api.github.com/users/openwhisk/orgs","repos_url":"https://api.github.com/users/openwhisk/repos","events_url":"https://api.github.com/users/openwhisk/events{/privacy}","received_events_url":"https://api.github.com/users/openwhisk/received_events","type":"Organization","site_admin":false},"repo":{"id":52039373,"name":"openwhisk","full_name":"openwhisk/openwhisk","owner":{"login":"openwhisk","id":16900235,"avatar_url":"https://avatars.githubusercontent.com/u/16900235?v=3","gravatar_id":"","url":"https://api.github.com/users/openwhisk","html_url":"https://github.com/openwhisk","followers_url":"https://api.github.com/users/openwhisk/followers","following_url":"https://api.github.com/users/openwhisk/following{/other_user}","gists_url":"https://api.github.com/users/openwhisk/gists{/gist_id}","starred_url":"https://api.github.com/users/openwhisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openwhisk/subscriptions","organizations_url":"https://api.github.com/users/openwhisk/orgs","repos_url":"https://api.github.com/users/openwhisk/repos","events_url":"https://api.github.com/users/openwhisk/events{/privacy}","received_events_url":"https://api.github.com/users/openwhisk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openwhisk/openwhisk","description":"OpenWhisk is a cloud-first distributed event-based programming service.","fork":false,"url":"https://api.github.com/repos/openwhisk/openwhisk","forks_url":"https://api.github.com/repos/openwhisk/openwhisk/forks","keys_url":"https://api.github.com/repos/openwhisk/openwhisk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openwhisk/openwhisk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openwhisk/openwhisk/teams","hooks_url":"https://api.github.com/repos/openwhisk/openwhisk/hooks","issue_events_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/events{/number}","events_url":"https://api.github.com/repos/openwhisk/openwhisk/events","assignees_url":"https://api.github.com/repos/openwhisk/openwhisk/assignees{/user}","branches_url":"https://api.github.com/repos/openwhisk/openwhisk/branches{/branch}","tags_url":"https://api.github.com/repos/openwhisk/openwhisk/tags","blobs_url":"https://api.github.com/repos/openwhisk/openwhisk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openwhisk/openwhisk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openwhisk/openwhisk/git/refs{/sha}","trees_url":"https://api.github.com/repos/openwhisk/openwhisk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openwhisk/openwhisk/statuses/{sha}","languages_url":"https://api.github.com/repos/openwhisk/openwhisk/languages","stargazers_url":"https://api.github.com/repos/openwhisk/openwhisk/stargazers","contributors_url":"https://api.github.com/repos/openwhisk/openwhisk/contributors","subscribers_url":"https://api.github.com/repos/openwhisk/openwhisk/subscribers","subscription_url":"https://api.github.com/repos/openwhisk/openwhisk/subscription","commits_url":"https://api.github.com/repos/openwhisk/openwhisk/commits{/sha}","git_commits_url":"https://api.github.com/repos/openwhisk/openwhisk/git/commits{/sha}","comments_url":"https://api.github.com/repos/openwhisk/openwhisk/comments{/number}","issue_comment_url":"https://api.github.com/repos/openwhisk/openwhisk/issues/comments{/number}","contents_url":"https://api.github.com/repos/openwhisk/openwhisk/contents/{+path}","compare_url":"https://api.github.com/repos/openwhisk/openwhisk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openwhisk/openwhisk/merges","archive_url":"https://api.github.com/repos/openwhisk/openwhisk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openwhisk/openwhisk/downloads","issues_url":"https://api.github.com/repos/openwhisk/openwhisk/issues{/number}","pulls_url":"https://api.github.com/repos/openwhisk/openwhisk/pulls{/number}","milestones_url":"https://api.github.com/repos/openwhisk/openwhisk/milestones{/number}","notifications_url":"https://api.github.com/repos/openwhisk/openwhisk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openwhisk/openwhisk/labels{/name}","releases_url":"https://api.github.com/repos/openwhisk/openwhisk/releases{/id}","deployments_url":"https://api.github.com/repos/openwhisk/openwhisk/deployments","created_at":"2016-02-18T21:16:19Z","updated_at":"2016-07-21T01:06:42Z","pushed_at":"2016-07-21T12:27:53Z","git_url":"git://github.com/openwhisk/openwhisk.git","ssh_url":"git@github.com:openwhisk/openwhisk.git","clone_url":"https://github.com/openwhisk/openwhisk.git","svn_url":"https://github.com/openwhisk/openwhisk","homepage":"","size":42833,"stargazers_count":429,"watchers_count":429,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"open_issues_count":257,"forks":122,"open_issues":257,"watchers":429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893"},"html":{"href":"https://github.com/openwhisk/openwhisk/pull/893"},"issue":{"href":"https://api.github.com/repos/openwhisk/openwhisk/issues/893"},"comments":{"href":"https://api.github.com/repos/openwhisk/openwhisk/issues/893/comments"},"review_comments":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893/comments"},"review_comment":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openwhisk/openwhisk/pulls/893/commits"},"statuses":{"href":"https://api.github.com/repos/openwhisk/openwhisk/statuses/3bdfd04ed982b23f10f008f20a5eb26d168321b2"}}}}
{"actor":{"display_login":"psuter"}}