{"action":"created","comment":{"url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments/84364890","pull_request_review_id":5148131,"id":84364890,"diff_hunk":"@@ -37,5 +39,17 @@ function extractEmailAndFormatSubmission (formResponse) {\n   return emailWithSubmission;\n }\n \n+// Using this object because I believe we will have more triggers \n+// based on assignment names provided by the typeform webhook","path":"www/canvas/helpers.js","position":13,"original_position":13,"commit_id":"e444cc708598699d3c35317540e0969301ba0430","original_commit_id":"e444cc708598699d3c35317540e0969301ba0430","user":{"login":"tongxiang","id":5678066,"avatar_url":"https://avatars.githubusercontent.com/u/5678066?v=3","gravatar_id":"","url":"https://api.github.com/users/tongxiang","html_url":"https://github.com/tongxiang","followers_url":"https://api.github.com/users/tongxiang/followers","following_url":"https://api.github.com/users/tongxiang/following{/other_user}","gists_url":"https://api.github.com/users/tongxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/tongxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tongxiang/subscriptions","organizations_url":"https://api.github.com/users/tongxiang/orgs","repos_url":"https://api.github.com/users/tongxiang/repos","events_url":"https://api.github.com/users/tongxiang/events{/privacy}","received_events_url":"https://api.github.com/users/tongxiang/received_events","type":"User","site_admin":false},"body":"Smart.","created_at":"2016-10-20T20:05:46Z","updated_at":"2016-10-20T20:05:46Z","html_url":"https://github.com/CrisisTextLine/Elmer/pull/217#discussion_r84364890","pull_request_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217","_links":{"self":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments/84364890"},"html":{"href":"https://github.com/CrisisTextLine/Elmer/pull/217#discussion_r84364890"},"pull_request":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217"}}},"pull_request":{"url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217","id":89283997,"html_url":"https://github.com/CrisisTextLine/Elmer/pull/217","diff_url":"https://github.com/CrisisTextLine/Elmer/pull/217.diff","patch_url":"https://github.com/CrisisTextLine/Elmer/pull/217.patch","issue_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/217","number":217,"state":"open","locked":false,"title":"Add role to trainees who complete Full Roleplay","user":{"login":"apackin","id":10517945,"avatar_url":"https://avatars.githubusercontent.com/u/10517945?v=3","gravatar_id":"","url":"https://api.github.com/users/apackin","html_url":"https://github.com/apackin","followers_url":"https://api.github.com/users/apackin/followers","following_url":"https://api.github.com/users/apackin/following{/other_user}","gists_url":"https://api.github.com/users/apackin/gists{/gist_id}","starred_url":"https://api.github.com/users/apackin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apackin/subscriptions","organizations_url":"https://api.github.com/users/apackin/orgs","repos_url":"https://api.github.com/users/apackin/repos","events_url":"https://api.github.com/users/apackin/events{/privacy}","received_events_url":"https://api.github.com/users/apackin/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\nAdds the CC1 Role for Trainees who complete assignment 'Full Roleplay' in Typeform.\r\nThis Role on CTL online allows them to start scheduling shifts.\r\n#### Where should the reviewer start?\r\n#### How should this be manually tested?\r\nAdd a user to a Canvas course (I used myself)\r\nInput passing grades for assignment 1-8\r\nView user CTL Online Roles on https://online.crisistextline.org/user/${userID}/edit\r\n  Make sure Role \"Crisis Counselor 1\" is not selected\r\nNode www/app.js\r\nPost to localhost:3000/canvas/typeformAssignment/Full Roleplay \r\nUse the following body with the email for Canvas account being used: \r\n {\r\n  \"event_id\": \"UwVP9f9sGU\",\r\n  \"event_type\": \"form_response\",\r\n  \"form_response\": {\r\n    \"form_id\": \"L5aBhG\",\r\n    \"token\": \"875527530cbc8ec306774088db80887f\",\r\n    \"submitted_at\": \"2016-08-12T14:49:14Z\",\r\n    \"calculated\": {\r\n      \"score\": 2\r\n    },\r\n    \"definition\": {\r\n      \"id\": \"L5aBhG\",\r\n      \"title\": \"\",\r\n      \"fields\": [\r\n        {\r\n          \"id\": \"3\",\r\n          \"title\": \"Question text: 3\",\r\n          \"type\": \"textfield\"\r\n        },\r\n        {\r\n          \"id\": \"2\",\r\n          \"title\": \"Question Bool: 2>\",\r\n          \"type\": \"yes-no\"\r\n        },\r\n        {\r\n          \"id\": \"1\",\r\n          \"title\": \"Please enter your email below\",\r\n          \"type\": \"email\"\r\n        }\r\n      ]\r\n    },\r\n    \"answers\": [\r\n      {\r\n        \"type\": \"text\",\r\n        \"text\": \"Sample Text Answer\",\r\n        \"field\": {\r\n          \"id\": \"3\",\r\n          \"type\": \"short_text\"\r\n        }\r\n      },\r\n      {\r\n        \"type\": \"boolean\",\r\n        \"boolean\": true,\r\n        \"field\": {\r\n          \"id\": \"2\",\r\n          \"type\": \"yes_no\"\r\n        }\r\n      },\r\n      {\r\n        \"type\": \"email\",\r\n        \"email\": \"apackin@gmail.com\",\r\n        \"field\": {\r\n          \"id\": \"1\",\r\n          \"type\": \"email\"\r\n        }\r\n      }\r\n    ]\r\n  }\r\n}\r\n\r\n\r\nRefresh https://online.crisistextline.org/user/${userID}/edit\r\n  and the Role \"Crisis Counselor 1\" should be selected.\r\n\r\n#### Any background context you want to provide?\r\n#### What are the relevant tickets?\r\nhttps://admin.crisistextline.org/jira/secure/RapidBoard.jspa?rapidView=5&view=detail&selectedIssue=INT-396\r\n#### Questions:\r\n\r\n","created_at":"2016-10-13T21:15:42Z","updated_at":"2016-10-20T20:05:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf44fcb6c8791721347439828b9c53619c76f6fa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217/commits","review_comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217/comments","review_comment_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/217/comments","statuses_url":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/e444cc708598699d3c35317540e0969301ba0430","head":{"label":"CrisisTextLine:fullRoleplayUnlockWiW","ref":"fullRoleplayUnlockWiW","sha":"e444cc708598699d3c35317540e0969301ba0430","user":{"login":"CrisisTextLine","id":3536558,"avatar_url":"https://avatars.githubusercontent.com/u/3536558?v=3","gravatar_id":"","url":"https://api.github.com/users/CrisisTextLine","html_url":"https://github.com/CrisisTextLine","followers_url":"https://api.github.com/users/CrisisTextLine/followers","following_url":"https://api.github.com/users/CrisisTextLine/following{/other_user}","gists_url":"https://api.github.com/users/CrisisTextLine/gists{/gist_id}","starred_url":"https://api.github.com/users/CrisisTextLine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrisisTextLine/subscriptions","organizations_url":"https://api.github.com/users/CrisisTextLine/orgs","repos_url":"https://api.github.com/users/CrisisTextLine/repos","events_url":"https://api.github.com/users/CrisisTextLine/events{/privacy}","received_events_url":"https://api.github.com/users/CrisisTextLine/received_events","type":"Organization","site_admin":false},"repo":{"id":47287892,"name":"Elmer","full_name":"CrisisTextLine/Elmer","owner":{"login":"CrisisTextLine","id":3536558,"avatar_url":"https://avatars.githubusercontent.com/u/3536558?v=3","gravatar_id":"","url":"https://api.github.com/users/CrisisTextLine","html_url":"https://github.com/CrisisTextLine","followers_url":"https://api.github.com/users/CrisisTextLine/followers","following_url":"https://api.github.com/users/CrisisTextLine/following{/other_user}","gists_url":"https://api.github.com/users/CrisisTextLine/gists{/gist_id}","starred_url":"https://api.github.com/users/CrisisTextLine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrisisTextLine/subscriptions","organizations_url":"https://api.github.com/users/CrisisTextLine/orgs","repos_url":"https://api.github.com/users/CrisisTextLine/repos","events_url":"https://api.github.com/users/CrisisTextLine/events{/privacy}","received_events_url":"https://api.github.com/users/CrisisTextLine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CrisisTextLine/Elmer","description":"Extends the functionality of WhenIWork for custom use cases","fork":false,"url":"https://api.github.com/repos/CrisisTextLine/Elmer","forks_url":"https://api.github.com/repos/CrisisTextLine/Elmer/forks","keys_url":"https://api.github.com/repos/CrisisTextLine/Elmer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CrisisTextLine/Elmer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CrisisTextLine/Elmer/teams","hooks_url":"https://api.github.com/repos/CrisisTextLine/Elmer/hooks","issue_events_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/events{/number}","events_url":"https://api.github.com/repos/CrisisTextLine/Elmer/events","assignees_url":"https://api.github.com/repos/CrisisTextLine/Elmer/assignees{/user}","branches_url":"https://api.github.com/repos/CrisisTextLine/Elmer/branches{/branch}","tags_url":"https://api.github.com/repos/CrisisTextLine/Elmer/tags","blobs_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/refs{/sha}","trees_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/{sha}","languages_url":"https://api.github.com/repos/CrisisTextLine/Elmer/languages","stargazers_url":"https://api.github.com/repos/CrisisTextLine/Elmer/stargazers","contributors_url":"https://api.github.com/repos/CrisisTextLine/Elmer/contributors","subscribers_url":"https://api.github.com/repos/CrisisTextLine/Elmer/subscribers","subscription_url":"https://api.github.com/repos/CrisisTextLine/Elmer/subscription","commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/commits{/sha}","git_commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/commits{/sha}","comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/comments{/number}","issue_comment_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/comments{/number}","contents_url":"https://api.github.com/repos/CrisisTextLine/Elmer/contents/{+path}","compare_url":"https://api.github.com/repos/CrisisTextLine/Elmer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CrisisTextLine/Elmer/merges","archive_url":"https://api.github.com/repos/CrisisTextLine/Elmer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CrisisTextLine/Elmer/downloads","issues_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues{/number}","pulls_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls{/number}","milestones_url":"https://api.github.com/repos/CrisisTextLine/Elmer/milestones{/number}","notifications_url":"https://api.github.com/repos/CrisisTextLine/Elmer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CrisisTextLine/Elmer/labels{/name}","releases_url":"https://api.github.com/repos/CrisisTextLine/Elmer/releases{/id}","deployments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/deployments","created_at":"2015-12-02T20:51:51Z","updated_at":"2016-09-12T07:08:57Z","pushed_at":"2016-10-20T17:06:12Z","git_url":"git://github.com/CrisisTextLine/Elmer.git","ssh_url":"git@github.com:CrisisTextLine/Elmer.git","clone_url":"https://github.com/CrisisTextLine/Elmer.git","svn_url":"https://github.com/CrisisTextLine/Elmer","homepage":"","size":681,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"CrisisTextLine:master","ref":"master","sha":"62fc8fa893c97b11ad79f43b7da66305113b3fa8","user":{"login":"CrisisTextLine","id":3536558,"avatar_url":"https://avatars.githubusercontent.com/u/3536558?v=3","gravatar_id":"","url":"https://api.github.com/users/CrisisTextLine","html_url":"https://github.com/CrisisTextLine","followers_url":"https://api.github.com/users/CrisisTextLine/followers","following_url":"https://api.github.com/users/CrisisTextLine/following{/other_user}","gists_url":"https://api.github.com/users/CrisisTextLine/gists{/gist_id}","starred_url":"https://api.github.com/users/CrisisTextLine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrisisTextLine/subscriptions","organizations_url":"https://api.github.com/users/CrisisTextLine/orgs","repos_url":"https://api.github.com/users/CrisisTextLine/repos","events_url":"https://api.github.com/users/CrisisTextLine/events{/privacy}","received_events_url":"https://api.github.com/users/CrisisTextLine/received_events","type":"Organization","site_admin":false},"repo":{"id":47287892,"name":"Elmer","full_name":"CrisisTextLine/Elmer","owner":{"login":"CrisisTextLine","id":3536558,"avatar_url":"https://avatars.githubusercontent.com/u/3536558?v=3","gravatar_id":"","url":"https://api.github.com/users/CrisisTextLine","html_url":"https://github.com/CrisisTextLine","followers_url":"https://api.github.com/users/CrisisTextLine/followers","following_url":"https://api.github.com/users/CrisisTextLine/following{/other_user}","gists_url":"https://api.github.com/users/CrisisTextLine/gists{/gist_id}","starred_url":"https://api.github.com/users/CrisisTextLine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrisisTextLine/subscriptions","organizations_url":"https://api.github.com/users/CrisisTextLine/orgs","repos_url":"https://api.github.com/users/CrisisTextLine/repos","events_url":"https://api.github.com/users/CrisisTextLine/events{/privacy}","received_events_url":"https://api.github.com/users/CrisisTextLine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CrisisTextLine/Elmer","description":"Extends the functionality of WhenIWork for custom use cases","fork":false,"url":"https://api.github.com/repos/CrisisTextLine/Elmer","forks_url":"https://api.github.com/repos/CrisisTextLine/Elmer/forks","keys_url":"https://api.github.com/repos/CrisisTextLine/Elmer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CrisisTextLine/Elmer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CrisisTextLine/Elmer/teams","hooks_url":"https://api.github.com/repos/CrisisTextLine/Elmer/hooks","issue_events_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/events{/number}","events_url":"https://api.github.com/repos/CrisisTextLine/Elmer/events","assignees_url":"https://api.github.com/repos/CrisisTextLine/Elmer/assignees{/user}","branches_url":"https://api.github.com/repos/CrisisTextLine/Elmer/branches{/branch}","tags_url":"https://api.github.com/repos/CrisisTextLine/Elmer/tags","blobs_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/refs{/sha}","trees_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/{sha}","languages_url":"https://api.github.com/repos/CrisisTextLine/Elmer/languages","stargazers_url":"https://api.github.com/repos/CrisisTextLine/Elmer/stargazers","contributors_url":"https://api.github.com/repos/CrisisTextLine/Elmer/contributors","subscribers_url":"https://api.github.com/repos/CrisisTextLine/Elmer/subscribers","subscription_url":"https://api.github.com/repos/CrisisTextLine/Elmer/subscription","commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/commits{/sha}","git_commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/git/commits{/sha}","comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/comments{/number}","issue_comment_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/comments{/number}","contents_url":"https://api.github.com/repos/CrisisTextLine/Elmer/contents/{+path}","compare_url":"https://api.github.com/repos/CrisisTextLine/Elmer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CrisisTextLine/Elmer/merges","archive_url":"https://api.github.com/repos/CrisisTextLine/Elmer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CrisisTextLine/Elmer/downloads","issues_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues{/number}","pulls_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls{/number}","milestones_url":"https://api.github.com/repos/CrisisTextLine/Elmer/milestones{/number}","notifications_url":"https://api.github.com/repos/CrisisTextLine/Elmer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CrisisTextLine/Elmer/labels{/name}","releases_url":"https://api.github.com/repos/CrisisTextLine/Elmer/releases{/id}","deployments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/deployments","created_at":"2015-12-02T20:51:51Z","updated_at":"2016-09-12T07:08:57Z","pushed_at":"2016-10-20T17:06:12Z","git_url":"git://github.com/CrisisTextLine/Elmer.git","ssh_url":"git@github.com:CrisisTextLine/Elmer.git","clone_url":"https://github.com/CrisisTextLine/Elmer.git","svn_url":"https://github.com/CrisisTextLine/Elmer","homepage":"","size":681,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217"},"html":{"href":"https://github.com/CrisisTextLine/Elmer/pull/217"},"issue":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/217"},"comments":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/217/comments"},"review_comments":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217/comments"},"review_comment":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/217/commits"},"statuses":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/e444cc708598699d3c35317540e0969301ba0430"}}}}
{"actor":{"display_login":"tongxiang"}}