{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/gambit/pulls/comments/82465088","pull_request_review_id":3374155,"id":82465088,"diff_hunk":"@@ -57,7 +57,21 @@ router.post('/', (req, res) => {\n     return res.sendStatus(500);\n   }\n \n-  let campaignId = req.query.campaign;\n+  let campaignId;\n+  if (req.body.keyword) {\n+    const keyword = req.body.keyword.toUpperCase();\n+\n+    if (keyword === 'BOOKBOT') {","path":"config/router-chatbot.js","position":9,"original_position":9,"commit_id":"b4fa311bf3c1d1dd1dd7bf50a10230a4971b5db8","original_commit_id":"b4fa311bf3c1d1dd1dd7bf50a10230a4971b5db8","user":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"body":"Switch/case?","created_at":"2016-10-07T20:33:56Z","updated_at":"2016-10-07T20:34:05Z","html_url":"https://github.com/DoSomething/gambit/pull/656#discussion_r82465088","pull_request_url":"https://api.github.com/repos/DoSomething/gambit/pulls/656","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/comments/82465088"},"html":{"href":"https://github.com/DoSomething/gambit/pull/656#discussion_r82465088"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/656"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/gambit/pulls/656","id":88502844,"html_url":"https://github.com/DoSomething/gambit/pull/656","diff_url":"https://github.com/DoSomething/gambit/pull/656.diff","patch_url":"https://github.com/DoSomething/gambit/pull/656.patch","issue_url":"https://api.github.com/repos/DoSomething/gambit/issues/656","number":656,"state":"open","locked":false,"title":"Deprecate req.query.campaign","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\n\r\n* Hardcodes CampaignBot keyword / campaign map to deprecate query parameters\r\n\r\n* We can use a single CampaignBot mData now that requests for all DS Campaigns go to a single `/v1/chatbot` URL.  For each incoming request, we determine which Campaign to load first by checking if the User texted in a CampaignBot keyword, if not we load the Campaign stored on the User's `current_campaign` property.\r\n\r\n\r\n#### How should this be reviewed?\r\n\r\nLocally : set expected `keyword` param and POST to `/v1/chatbot` to test conversation\r\n\r\nStaging:\r\n* [ ] Deploy to staging\r\n* [ ] Deactivate all mData's with a `?campaign=` defined\r\n* [ ] Add each keyword from de-activated mData onto the CampaignBot mData's keywords\r\n* [ ] Test keywords, conversation\r\n\r\n#### Any background context you want to provide?\r\nNext up is adding a Campaign model back in to avoid hardcoding and begin work on #652 \r\n\r\n#### Relevant tickets\r\n#655 \r\n\r\n#### Checklist\r\n- [ ] Documentation added for new features/changed endpoints.\r\n- [ ] Tested on staging.\r\n\r\n","created_at":"2016-10-07T20:28:45Z","updated_at":"2016-10-07T20:34:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e9d3c620c3e8dd219fe6899bf0642058c896a54","assignee":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"assignees":[{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/gambit/pulls/656/commits","review_comments_url":"https://api.github.com/repos/DoSomething/gambit/pulls/656/comments","review_comment_url":"https://api.github.com/repos/DoSomething/gambit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/gambit/issues/656/comments","statuses_url":"https://api.github.com/repos/DoSomething/gambit/statuses/b4fa311bf3c1d1dd1dd7bf50a10230a4971b5db8","head":{"label":"DoSomething:issue-655","ref":"issue-655","sha":"b4fa311bf3c1d1dd1dd7bf50a10230a4971b5db8","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":17884814,"name":"gambit","full_name":"DoSomething/gambit","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/gambit","description":":black_joker: The DoSomething.org SMS campaign engine. ","fork":false,"url":"https://api.github.com/repos/DoSomething/gambit","forks_url":"https://api.github.com/repos/DoSomething/gambit/forks","keys_url":"https://api.github.com/repos/DoSomething/gambit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/gambit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/gambit/teams","hooks_url":"https://api.github.com/repos/DoSomething/gambit/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/gambit/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/gambit/events","assignees_url":"https://api.github.com/repos/DoSomething/gambit/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/gambit/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/gambit/tags","blobs_url":"https://api.github.com/repos/DoSomething/gambit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/gambit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/gambit/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/gambit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/gambit/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/gambit/languages","stargazers_url":"https://api.github.com/repos/DoSomething/gambit/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/gambit/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/gambit/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/gambit/subscription","commits_url":"https://api.github.com/repos/DoSomething/gambit/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/gambit/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/gambit/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/gambit/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/gambit/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/gambit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/gambit/merges","archive_url":"https://api.github.com/repos/DoSomething/gambit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/gambit/downloads","issues_url":"https://api.github.com/repos/DoSomething/gambit/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/gambit/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/gambit/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/gambit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/gambit/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/gambit/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/gambit/deployments","created_at":"2014-03-18T22:51:45Z","updated_at":"2016-08-10T14:09:34Z","pushed_at":"2016-10-07T20:28:45Z","git_url":"git://github.com/DoSomething/gambit.git","ssh_url":"git@github.com:DoSomething/gambit.git","clone_url":"https://github.com/DoSomething/gambit.git","svn_url":"https://github.com/DoSomething/gambit","homepage":"","size":1315,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":26,"forks":4,"open_issues":26,"watchers":2,"default_branch":"develop"}},"base":{"label":"DoSomething:develop","ref":"develop","sha":"4775d42da815f2e72cde22ca91b3e2867e565af2","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":17884814,"name":"gambit","full_name":"DoSomething/gambit","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/gambit","description":":black_joker: The DoSomething.org SMS campaign engine. ","fork":false,"url":"https://api.github.com/repos/DoSomething/gambit","forks_url":"https://api.github.com/repos/DoSomething/gambit/forks","keys_url":"https://api.github.com/repos/DoSomething/gambit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/gambit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/gambit/teams","hooks_url":"https://api.github.com/repos/DoSomething/gambit/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/gambit/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/gambit/events","assignees_url":"https://api.github.com/repos/DoSomething/gambit/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/gambit/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/gambit/tags","blobs_url":"https://api.github.com/repos/DoSomething/gambit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/gambit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/gambit/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/gambit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/gambit/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/gambit/languages","stargazers_url":"https://api.github.com/repos/DoSomething/gambit/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/gambit/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/gambit/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/gambit/subscription","commits_url":"https://api.github.com/repos/DoSomething/gambit/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/gambit/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/gambit/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/gambit/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/gambit/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/gambit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/gambit/merges","archive_url":"https://api.github.com/repos/DoSomething/gambit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/gambit/downloads","issues_url":"https://api.github.com/repos/DoSomething/gambit/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/gambit/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/gambit/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/gambit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/gambit/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/gambit/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/gambit/deployments","created_at":"2014-03-18T22:51:45Z","updated_at":"2016-08-10T14:09:34Z","pushed_at":"2016-10-07T20:28:45Z","git_url":"git://github.com/DoSomething/gambit.git","ssh_url":"git@github.com:DoSomething/gambit.git","clone_url":"https://github.com/DoSomething/gambit.git","svn_url":"https://github.com/DoSomething/gambit","homepage":"","size":1315,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":26,"forks":4,"open_issues":26,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/656"},"html":{"href":"https://github.com/DoSomething/gambit/pull/656"},"issue":{"href":"https://api.github.com/repos/DoSomething/gambit/issues/656"},"comments":{"href":"https://api.github.com/repos/DoSomething/gambit/issues/656/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/656/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/gambit/pulls/656/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/gambit/statuses/b4fa311bf3c1d1dd1dd7bf50a10230a4971b5db8"}}}}
{"actor":{"display_login":"sergii-tkachenko"}}