{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/blink/pulls/comments/199927488","pull_request_review_id":134142200,"id":199927488,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTkyNzQ4OA==","diff_hunk":"@@ -1,13 +1,62 @@\n 'use strict';\n \n const fetch = require('node-fetch');\n+const logger = require('winston');\n /**\n  * Deep Extend is used because Object.assign does shallow-copy only. Nested objects are\n  * referenced instead of copied which can bring unintended consequences.\n  */\n const deepExtend = require('deep-extend');\n \n const gambitConfig = require('../../../config/gambit');\n+const BlinkRetryError = require('../../errors/BlinkRetryError');\n+\n+// TODO: This helper is becoming too big, needs to be split into more defined responsibilities\n+\n+/**\n+ * executeGet - Sends a GET requests to the v1MessagesBaseURL host and given path\n+ *\n+ * @async\n+ * @param  {String} path\n+ * @param  {Object} opts = {} @see https://www.npmjs.com/package/node-fetch#options\n+ * @return {Promise}\n+ */\n+module.exports.executeGet = async function executeGet(path, opts = {}) {\n+  const options = Object.assign({}, deepExtend(opts, {","path":"src/lib/helpers/gambit.js","position":25,"original_position":25,"commit_id":"4d1dc1babecb617c27735efb22a17c788129c6f7","original_commit_id":"bf077eb8084bac6b343bc809d4e6143677ebe5ce","user":{"login":"rapala61","id":863301,"node_id":"MDQ6VXNlcjg2MzMwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/863301?v=4","gravatar_id":"","url":"https://api.github.com/users/rapala61","html_url":"https://github.com/rapala61","followers_url":"https://api.github.com/users/rapala61/followers","following_url":"https://api.github.com/users/rapala61/following{/other_user}","gists_url":"https://api.github.com/users/rapala61/gists{/gist_id}","starred_url":"https://api.github.com/users/rapala61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapala61/subscriptions","organizations_url":"https://api.github.com/users/rapala61/orgs","repos_url":"https://api.github.com/users/rapala61/repos","events_url":"https://api.github.com/users/rapala61/events{/privacy}","received_events_url":"https://api.github.com/users/rapala61/received_events","type":"User","site_admin":false},"body":"I can see now the mutability 🐛Thanks! However, I do want to keep the deep extension vs the replacement behavior I would get without the `deepExtend`. What do you think of:\r\n```\r\nconst options = { ...deepExtend({}, opts, { method: 'GET' }) }\r\n```\r\nThis is so that if the `opts` object had some necessary `headers` property, and we had some additional `headers` in this method, we would not end up replacing them instead of extending them by mistake.","created_at":"2018-07-03T19:35:12Z","updated_at":"2018-07-03T19:35:13Z","html_url":"https://github.com/DoSomething/blink/pull/211#discussion_r199927488","pull_request_url":"https://api.github.com/repos/DoSomething/blink/pulls/211","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/comments/199927488"},"html":{"href":"https://github.com/DoSomething/blink/pull/211#discussion_r199927488"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/211"}},"in_reply_to_id":199913694},"pull_request":{"url":"https://api.github.com/repos/DoSomething/blink/pulls/211","id":198707801,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NzA3ODAx","html_url":"https://github.com/DoSomething/blink/pull/211","diff_url":"https://github.com/DoSomething/blink/pull/211.diff","patch_url":"https://github.com/DoSomething/blink/pull/211.patch","issue_url":"https://api.github.com/repos/DoSomething/blink/issues/211","number":211,"state":"open","locked":false,"title":"Feature/web sms active welcome - Worker [pr]","user":{"login":"rapala61","id":863301,"node_id":"MDQ6VXNlcjg2MzMwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/863301?v=4","gravatar_id":"","url":"https://api.github.com/users/rapala61","html_url":"https://github.com/rapala61","followers_url":"https://api.github.com/users/rapala61/followers","following_url":"https://api.github.com/users/rapala61/following{/other_user}","gists_url":"https://api.github.com/users/rapala61/gists{/gist_id}","starred_url":"https://api.github.com/users/rapala61/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapala61/subscriptions","organizations_url":"https://api.github.com/users/rapala61/orgs","repos_url":"https://api.github.com/users/rapala61/repos","events_url":"https://api.github.com/users/rapala61/events{/privacy}","received_events_url":"https://api.github.com/users/rapala61/received_events","type":"User","site_admin":false},"body":"## What's this PR do?\r\n\r\n- Implements the sms status active (welcome) message worker.\r\n- Upgrades node to latest 8x LTS version 8.11.3\r\n- It removes the local `getRequestHeaders` method and uses the `/helpers/gambit` helper instead for `CustomerIoSmsStatusActiveWorker` and `CustomerIoGambitBroadcastWorker`.\r\n- Fixes bug (found while creating this worker) that would not retry requests to G-Conversation if it was unreachable.\r\n    - Fixing this bug properly required refactoring all workers that relay messages to G-Conversations. This will make the PR longer, but is a necessary step forward that I have been putting off for too long.\r\n\r\n## How to test\r\n- 👀 \r\n- Run all tests\r\n\r\n## Relevant Issues\r\n- [Pivotal#158511600](https://www.pivotaltracker.com/story/show/158511600) - Blink\r\n- [Pivotal#158460231](https://www.pivotaltracker.com/story/show/158460231) - Gambit\r\n- Fixes #212 \r\n\r\n## Todo\r\n- [x] Tests for this worker","created_at":"2018-07-02T15:03:57Z","updated_at":"2018-07-03T19:35:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"464341be5b09de3b40b0b785ff22de8e690bb991","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/blink/pulls/211/commits","review_comments_url":"https://api.github.com/repos/DoSomething/blink/pulls/211/comments","review_comment_url":"https://api.github.com/repos/DoSomething/blink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/blink/issues/211/comments","statuses_url":"https://api.github.com/repos/DoSomething/blink/statuses/4d1dc1babecb617c27735efb22a17c788129c6f7","head":{"label":"DoSomething:feature/web-sms-active-welcome","ref":"feature/web-sms-active-welcome","sha":"4d1dc1babecb617c27735efb22a17c788129c6f7","user":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","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":83058210,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1ODIxMA==","name":"blink","full_name":"DoSomething/blink","owner":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","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/blink","description":":postbox: The DoSomething.org message bus.","fork":false,"url":"https://api.github.com/repos/DoSomething/blink","forks_url":"https://api.github.com/repos/DoSomething/blink/forks","keys_url":"https://api.github.com/repos/DoSomething/blink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/blink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/blink/teams","hooks_url":"https://api.github.com/repos/DoSomething/blink/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/blink/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/blink/events","assignees_url":"https://api.github.com/repos/DoSomething/blink/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/blink/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/blink/tags","blobs_url":"https://api.github.com/repos/DoSomething/blink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/blink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/blink/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/blink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/blink/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/blink/languages","stargazers_url":"https://api.github.com/repos/DoSomething/blink/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/blink/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/blink/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/blink/subscription","commits_url":"https://api.github.com/repos/DoSomething/blink/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/blink/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/blink/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/blink/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/blink/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/blink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/blink/merges","archive_url":"https://api.github.com/repos/DoSomething/blink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/blink/downloads","issues_url":"https://api.github.com/repos/DoSomething/blink/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/blink/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/blink/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/blink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/blink/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/blink/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/blink/deployments","created_at":"2017-02-24T15:59:24Z","updated_at":"2018-06-28T23:20:44Z","pushed_at":"2018-07-03T18:51:30Z","git_url":"git://github.com/DoSomething/blink.git","ssh_url":"git@github.com:DoSomething/blink.git","clone_url":"https://github.com/DoSomething/blink.git","svn_url":"https://github.com/DoSomething/blink","homepage":"","size":1210,"stargazers_count":4,"watchers_count":4,"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":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":19,"watchers":4,"default_branch":"master"}},"base":{"label":"DoSomething:master","ref":"master","sha":"9aa363e7e9b9adeef634af780d40fd1b6353a307","user":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","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":83058210,"node_id":"MDEwOlJlcG9zaXRvcnk4MzA1ODIxMA==","name":"blink","full_name":"DoSomething/blink","owner":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","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/blink","description":":postbox: The DoSomething.org message bus.","fork":false,"url":"https://api.github.com/repos/DoSomething/blink","forks_url":"https://api.github.com/repos/DoSomething/blink/forks","keys_url":"https://api.github.com/repos/DoSomething/blink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/blink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/blink/teams","hooks_url":"https://api.github.com/repos/DoSomething/blink/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/blink/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/blink/events","assignees_url":"https://api.github.com/repos/DoSomething/blink/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/blink/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/blink/tags","blobs_url":"https://api.github.com/repos/DoSomething/blink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/blink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/blink/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/blink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/blink/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/blink/languages","stargazers_url":"https://api.github.com/repos/DoSomething/blink/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/blink/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/blink/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/blink/subscription","commits_url":"https://api.github.com/repos/DoSomething/blink/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/blink/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/blink/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/blink/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/blink/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/blink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/blink/merges","archive_url":"https://api.github.com/repos/DoSomething/blink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/blink/downloads","issues_url":"https://api.github.com/repos/DoSomething/blink/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/blink/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/blink/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/blink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/blink/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/blink/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/blink/deployments","created_at":"2017-02-24T15:59:24Z","updated_at":"2018-06-28T23:20:44Z","pushed_at":"2018-07-03T18:51:30Z","git_url":"git://github.com/DoSomething/blink.git","ssh_url":"git@github.com:DoSomething/blink.git","clone_url":"https://github.com/DoSomething/blink.git","svn_url":"https://github.com/DoSomething/blink","homepage":"","size":1210,"stargazers_count":4,"watchers_count":4,"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":19,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":19,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/211"},"html":{"href":"https://github.com/DoSomething/blink/pull/211"},"issue":{"href":"https://api.github.com/repos/DoSomething/blink/issues/211"},"comments":{"href":"https://api.github.com/repos/DoSomething/blink/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/blink/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/blink/statuses/4d1dc1babecb617c27735efb22a17c788129c6f7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rapala61"}}