{"action":"created","comment":{"url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/comments/229507190","pull_request_review_id":170025796,"id":229507190,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTUwNzE5MA==","diff_hunk":"@@ -20,16 +21,22 @@ exports.handler = (event, context, callback) => {\n       body: JSON.stringify(body),\n     })\n \n-  axios\n-    .get(`https://api.stackexchange.com/search/advanced?${params}`)\n-    .then(({ data }) => {\n-      respond({\n+  // if the text value is null just send a response skip the api call.\n+  text === null","path":"src/ask.js","position":19,"original_position":19,"commit_id":"130ab70a56662149a063be90870971effdbf44d8","original_commit_id":"130ab70a56662149a063be90870971effdbf44d8","user":{"login":"alex-wilmer","id":2880089,"node_id":"MDQ6VXNlcjI4ODAwODk=","avatar_url":"https://avatars2.githubusercontent.com/u/2880089?v=4","gravatar_id":"","url":"https://api.github.com/users/alex-wilmer","html_url":"https://github.com/alex-wilmer","followers_url":"https://api.github.com/users/alex-wilmer/followers","following_url":"https://api.github.com/users/alex-wilmer/following{/other_user}","gists_url":"https://api.github.com/users/alex-wilmer/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-wilmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-wilmer/subscriptions","organizations_url":"https://api.github.com/users/alex-wilmer/orgs","repos_url":"https://api.github.com/users/alex-wilmer/repos","events_url":"https://api.github.com/users/alex-wilmer/events{/privacy}","received_events_url":"https://api.github.com/users/alex-wilmer/received_events","type":"User","site_admin":false},"body":"Yeah so here I would recommend just using an if statement instead of a ternary.\r\n\r\n```\r\nif (!text) {\r\n  respond(...)\r\n} else {\r\n  axios(...)\r\n}\r\n```","created_at":"2018-10-30T22:20:15Z","updated_at":"2018-10-30T22:20:15Z","html_url":"https://github.com/torontojs/slack-overflow/pull/4#discussion_r229507190","pull_request_url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/comments/229507190"},"html":{"href":"https://github.com/torontojs/slack-overflow/pull/4#discussion_r229507190"},"pull_request":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4","id":226909787,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTA5Nzg3","html_url":"https://github.com/torontojs/slack-overflow/pull/4","diff_url":"https://github.com/torontojs/slack-overflow/pull/4.diff","patch_url":"https://github.com/torontojs/slack-overflow/pull/4.patch","issue_url":"https://api.github.com/repos/torontojs/slack-overflow/issues/4","number":4,"state":"open","locked":false,"title":"if question is empty send a more helpful response","user":{"login":"GeorgiosP","id":16391584,"node_id":"MDQ6VXNlcjE2MzkxNTg0","avatar_url":"https://avatars0.githubusercontent.com/u/16391584?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgiosP","html_url":"https://github.com/GeorgiosP","followers_url":"https://api.github.com/users/GeorgiosP/followers","following_url":"https://api.github.com/users/GeorgiosP/following{/other_user}","gists_url":"https://api.github.com/users/GeorgiosP/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgiosP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgiosP/subscriptions","organizations_url":"https://api.github.com/users/GeorgiosP/orgs","repos_url":"https://api.github.com/users/GeorgiosP/repos","events_url":"https://api.github.com/users/GeorgiosP/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgiosP/received_events","type":"User","site_admin":false},"body":"PR for #1 hopefully its a bit more helpful 😎","created_at":"2018-10-30T12:54:31Z","updated_at":"2018-10-30T22:20:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e11058a27bc1014fa1c34905b624f399d3826296","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4/commits","review_comments_url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4/comments","review_comment_url":"https://api.github.com/repos/torontojs/slack-overflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/torontojs/slack-overflow/issues/4/comments","statuses_url":"https://api.github.com/repos/torontojs/slack-overflow/statuses/130ab70a56662149a063be90870971effdbf44d8","head":{"label":"GeorgiosP:master","ref":"master","sha":"130ab70a56662149a063be90870971effdbf44d8","user":{"login":"GeorgiosP","id":16391584,"node_id":"MDQ6VXNlcjE2MzkxNTg0","avatar_url":"https://avatars0.githubusercontent.com/u/16391584?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgiosP","html_url":"https://github.com/GeorgiosP","followers_url":"https://api.github.com/users/GeorgiosP/followers","following_url":"https://api.github.com/users/GeorgiosP/following{/other_user}","gists_url":"https://api.github.com/users/GeorgiosP/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgiosP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgiosP/subscriptions","organizations_url":"https://api.github.com/users/GeorgiosP/orgs","repos_url":"https://api.github.com/users/GeorgiosP/repos","events_url":"https://api.github.com/users/GeorgiosP/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgiosP/received_events","type":"User","site_admin":false},"repo":{"id":155371744,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUzNzE3NDQ=","name":"slack-overflow","full_name":"GeorgiosP/slack-overflow","private":false,"owner":{"login":"GeorgiosP","id":16391584,"node_id":"MDQ6VXNlcjE2MzkxNTg0","avatar_url":"https://avatars0.githubusercontent.com/u/16391584?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgiosP","html_url":"https://github.com/GeorgiosP","followers_url":"https://api.github.com/users/GeorgiosP/followers","following_url":"https://api.github.com/users/GeorgiosP/following{/other_user}","gists_url":"https://api.github.com/users/GeorgiosP/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgiosP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgiosP/subscriptions","organizations_url":"https://api.github.com/users/GeorgiosP/orgs","repos_url":"https://api.github.com/users/GeorgiosP/repos","events_url":"https://api.github.com/users/GeorgiosP/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgiosP/received_events","type":"User","site_admin":false},"html_url":"https://github.com/GeorgiosP/slack-overflow","description":"Respond to a Slack slash command with Stackoverflow answers.","fork":true,"url":"https://api.github.com/repos/GeorgiosP/slack-overflow","forks_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/forks","keys_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/teams","hooks_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/hooks","issue_events_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/issues/events{/number}","events_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/events","assignees_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/assignees{/user}","branches_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/branches{/branch}","tags_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/tags","blobs_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/statuses/{sha}","languages_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/languages","stargazers_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/stargazers","contributors_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/contributors","subscribers_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/subscribers","subscription_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/subscription","commits_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/contents/{+path}","compare_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/merges","archive_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/downloads","issues_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/issues{/number}","pulls_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/pulls{/number}","milestones_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/milestones{/number}","notifications_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/labels{/name}","releases_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/releases{/id}","deployments_url":"https://api.github.com/repos/GeorgiosP/slack-overflow/deployments","created_at":"2018-10-30T11:11:59Z","updated_at":"2018-10-30T13:50:11Z","pushed_at":"2018-10-30T13:50:09Z","git_url":"git://github.com/GeorgiosP/slack-overflow.git","ssh_url":"git@github.com:GeorgiosP/slack-overflow.git","clone_url":"https://github.com/GeorgiosP/slack-overflow.git","svn_url":"https://github.com/GeorgiosP/slack-overflow","homepage":null,"size":123,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"torontojs:master","ref":"master","sha":"1733c6a485223904dd9509291dbf62d6dcf4ffa3","user":{"login":"torontojs","id":1886951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4ODY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1886951?v=4","gravatar_id":"","url":"https://api.github.com/users/torontojs","html_url":"https://github.com/torontojs","followers_url":"https://api.github.com/users/torontojs/followers","following_url":"https://api.github.com/users/torontojs/following{/other_user}","gists_url":"https://api.github.com/users/torontojs/gists{/gist_id}","starred_url":"https://api.github.com/users/torontojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torontojs/subscriptions","organizations_url":"https://api.github.com/users/torontojs/orgs","repos_url":"https://api.github.com/users/torontojs/repos","events_url":"https://api.github.com/users/torontojs/events{/privacy}","received_events_url":"https://api.github.com/users/torontojs/received_events","type":"Organization","site_admin":false},"repo":{"id":153844308,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4NDQzMDg=","name":"slack-overflow","full_name":"torontojs/slack-overflow","private":false,"owner":{"login":"torontojs","id":1886951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4ODY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1886951?v=4","gravatar_id":"","url":"https://api.github.com/users/torontojs","html_url":"https://github.com/torontojs","followers_url":"https://api.github.com/users/torontojs/followers","following_url":"https://api.github.com/users/torontojs/following{/other_user}","gists_url":"https://api.github.com/users/torontojs/gists{/gist_id}","starred_url":"https://api.github.com/users/torontojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torontojs/subscriptions","organizations_url":"https://api.github.com/users/torontojs/orgs","repos_url":"https://api.github.com/users/torontojs/repos","events_url":"https://api.github.com/users/torontojs/events{/privacy}","received_events_url":"https://api.github.com/users/torontojs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/torontojs/slack-overflow","description":"Respond to a Slack slash command with Stackoverflow answers.","fork":false,"url":"https://api.github.com/repos/torontojs/slack-overflow","forks_url":"https://api.github.com/repos/torontojs/slack-overflow/forks","keys_url":"https://api.github.com/repos/torontojs/slack-overflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torontojs/slack-overflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torontojs/slack-overflow/teams","hooks_url":"https://api.github.com/repos/torontojs/slack-overflow/hooks","issue_events_url":"https://api.github.com/repos/torontojs/slack-overflow/issues/events{/number}","events_url":"https://api.github.com/repos/torontojs/slack-overflow/events","assignees_url":"https://api.github.com/repos/torontojs/slack-overflow/assignees{/user}","branches_url":"https://api.github.com/repos/torontojs/slack-overflow/branches{/branch}","tags_url":"https://api.github.com/repos/torontojs/slack-overflow/tags","blobs_url":"https://api.github.com/repos/torontojs/slack-overflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torontojs/slack-overflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torontojs/slack-overflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/torontojs/slack-overflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torontojs/slack-overflow/statuses/{sha}","languages_url":"https://api.github.com/repos/torontojs/slack-overflow/languages","stargazers_url":"https://api.github.com/repos/torontojs/slack-overflow/stargazers","contributors_url":"https://api.github.com/repos/torontojs/slack-overflow/contributors","subscribers_url":"https://api.github.com/repos/torontojs/slack-overflow/subscribers","subscription_url":"https://api.github.com/repos/torontojs/slack-overflow/subscription","commits_url":"https://api.github.com/repos/torontojs/slack-overflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/torontojs/slack-overflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/torontojs/slack-overflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/torontojs/slack-overflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/torontojs/slack-overflow/contents/{+path}","compare_url":"https://api.github.com/repos/torontojs/slack-overflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torontojs/slack-overflow/merges","archive_url":"https://api.github.com/repos/torontojs/slack-overflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torontojs/slack-overflow/downloads","issues_url":"https://api.github.com/repos/torontojs/slack-overflow/issues{/number}","pulls_url":"https://api.github.com/repos/torontojs/slack-overflow/pulls{/number}","milestones_url":"https://api.github.com/repos/torontojs/slack-overflow/milestones{/number}","notifications_url":"https://api.github.com/repos/torontojs/slack-overflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torontojs/slack-overflow/labels{/name}","releases_url":"https://api.github.com/repos/torontojs/slack-overflow/releases{/id}","deployments_url":"https://api.github.com/repos/torontojs/slack-overflow/deployments","created_at":"2018-10-19T21:31:33Z","updated_at":"2018-10-25T00:31:54Z","pushed_at":"2018-10-30T13:50:11Z","git_url":"git://github.com/torontojs/slack-overflow.git","ssh_url":"git@github.com:torontojs/slack-overflow.git","clone_url":"https://github.com/torontojs/slack-overflow.git","svn_url":"https://github.com/torontojs/slack-overflow","homepage":null,"size":78,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4"},"html":{"href":"https://github.com/torontojs/slack-overflow/pull/4"},"issue":{"href":"https://api.github.com/repos/torontojs/slack-overflow/issues/4"},"comments":{"href":"https://api.github.com/repos/torontojs/slack-overflow/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/torontojs/slack-overflow/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/torontojs/slack-overflow/statuses/130ab70a56662149a063be90870971effdbf44d8"}},"author_association":"NONE"}}
{"actor":{"display_login":"alex-wilmer"}}