{"action":"created","comment":{"url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments/82263283","pull_request_review_id":3183362,"id":82263283,"diff_hunk":"@@ -0,0 +1,449 @@\n+'use strict';\n+const CronJob = require('cron').CronJob;\n+const internalRequest = require('request');\n+const fetch = require('node-fetch');\n+const KEYS = require('./keys.js');\n+const fs = require('fs');\n+const APICallsPerSecond = 10;\n+const SLACK_CHANNEL = '#training';\n+// const CONFIG = require('../../config.js');\n+\n+// new CronJob(CONFIG.melted_users_on_slack_cron_job_string, function () {\n+//     postMeltedUserDataToSlack();\n+//   }, null, true);\n+","path":"jobs/training/meltedDataDumpToSlack.js","position":14,"original_position":14,"commit_id":"dec309a62853c8a6fda37dc9541690628448be33","original_commit_id":"dec309a62853c8a6fda37dc9541690628448be33","user":{"login":"mbogor","id":16216164,"avatar_url":"https://avatars.githubusercontent.com/u/16216164?v=3","gravatar_id":"","url":"https://api.github.com/users/mbogor","html_url":"https://github.com/mbogor","followers_url":"https://api.github.com/users/mbogor/followers","following_url":"https://api.github.com/users/mbogor/following{/other_user}","gists_url":"https://api.github.com/users/mbogor/gists{/gist_id}","starred_url":"https://api.github.com/users/mbogor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbogor/subscriptions","organizations_url":"https://api.github.com/users/mbogor/orgs","repos_url":"https://api.github.com/users/mbogor/repos","events_url":"https://api.github.com/users/mbogor/events{/privacy}","received_events_url":"https://api.github.com/users/mbogor/received_events","type":"User","site_admin":false},"body":"add a comment before each function describing what it does","created_at":"2016-10-06T19:17:35Z","updated_at":"2016-10-06T19:17:35Z","html_url":"https://github.com/CrisisTextLine/Elmer/pull/210#discussion_r82263283","pull_request_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210","_links":{"self":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments/82263283"},"html":{"href":"https://github.com/CrisisTextLine/Elmer/pull/210#discussion_r82263283"},"pull_request":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210","id":88268727,"html_url":"https://github.com/CrisisTextLine/Elmer/pull/210","diff_url":"https://github.com/CrisisTextLine/Elmer/pull/210.diff","patch_url":"https://github.com/CrisisTextLine/Elmer/pull/210.patch","issue_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/210","number":210,"state":"open","locked":false,"title":"Melted data dump onto Slack","user":{"login":"mikehow1984","id":8138556,"avatar_url":"https://avatars.githubusercontent.com/u/8138556?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehow1984","html_url":"https://github.com/mikehow1984","followers_url":"https://api.github.com/users/mikehow1984/followers","following_url":"https://api.github.com/users/mikehow1984/following{/other_user}","gists_url":"https://api.github.com/users/mikehow1984/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehow1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehow1984/subscriptions","organizations_url":"https://api.github.com/users/mikehow1984/orgs","repos_url":"https://api.github.com/users/mikehow1984/repos","events_url":"https://api.github.com/users/mikehow1984/events{/privacy}","received_events_url":"https://api.github.com/users/mikehow1984/received_events","type":"User","site_admin":false},"body":"#### **What's this PR do?**\r\nPulls data from CTLOnline and Canvas for users enrolled in Canvas, users accepted into training, graduates, and users who started their first shift. This data is then to be dumped every day at 10AM onto the '#training' Slack channel. \r\n\r\n#### **Where should the reviewer start?**\r\nmeltedDataDumpToSlack.js in jobs/training. There is also a test in the test folder. \r\n\r\n#### **How should this be manually tested?**\r\nI tested this outputting the object containing the data onto the console to test the integrity. \r\n\r\n#### **Any background context you want to provide?**\r\nThe data from this will be passed into a new future feature (meltedDataDumpToCSV) that will put melted user data in a CSV file. This is why the object also contains class ids and all users in a class. \r\n\r\n#### **What are the relevant tickets?**\r\n[INT-381](https://admin.crisistextline.org/jira/browse/INT-381)\r\n#### Questions:\r\n","created_at":"2016-10-06T14:06:40Z","updated_at":"2016-10-06T19:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d8a59e260de418d02a0facf350af49019c3b640","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210/commits","review_comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210/comments","review_comment_url":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/210/comments","statuses_url":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/dec309a62853c8a6fda37dc9541690628448be33","head":{"label":"CrisisTextLine:meltedData","ref":"meltedData","sha":"dec309a62853c8a6fda37dc9541690628448be33","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-06T16:57:30Z","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":654,"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":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"base":{"label":"CrisisTextLine:master","ref":"master","sha":"ba82946dc1ea4c20ce94be31c975cb37e94cbaa1","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-06T16:57:30Z","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":654,"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":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210"},"html":{"href":"https://github.com/CrisisTextLine/Elmer/pull/210"},"issue":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/210"},"comments":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/CrisisTextLine/Elmer/statuses/dec309a62853c8a6fda37dc9541690628448be33"}}}}
{"actor":{"display_login":"mbogor"}}