{"action":"created","comment":{"url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/comments/201002432","pull_request_review_id":135412444,"id":201002432,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTAwMjQzMg==","diff_hunk":"@@ -17,9 +17,13 @@ export const loadUsers = () => {\n };\n \n export const sendSlackMessage = async (id, itemName, storeCode) => {\n-\tawait fetch(`http://slack.com/api/chat.postMessage?token=${\n-\t\tthis.props.token\n-\t}&\n-\tchannel=${id}&\n-\ttext=${`Click to purchase your ${itemName}: https://honesty.store/item/${storeCode}`}`);\n+\ttry {\n+\t\tawait fetch(`http://slack.com/api/chat.postMessage?token=${\n+\t\t\tthis.props.token\n+\t\t}&\n+\t\tchannel=${id}&\n+\t\ttext=${`Click to purchase your ${itemName}: https://honesty.store/item/${storeCode}`}`);\n+\t} catch (error) {\n+\t\tconsole.error('Failed to obtain env variable: SLACK_TOKEN');","path":"src/utils/slack.js","position":22,"original_position":22,"commit_id":"8651d955f529c898ccb0aa8f64f99b5a539bed34","original_commit_id":"dde58c86b87a9e6d4de5fd48481c28b5dc34bfee","user":{"login":"craigayre","id":10518061,"node_id":"MDQ6VXNlcjEwNTE4MDYx","avatar_url":"https://avatars0.githubusercontent.com/u/10518061?v=4","gravatar_id":"","url":"https://api.github.com/users/craigayre","html_url":"https://github.com/craigayre","followers_url":"https://api.github.com/users/craigayre/followers","following_url":"https://api.github.com/users/craigayre/following{/other_user}","gists_url":"https://api.github.com/users/craigayre/gists{/gist_id}","starred_url":"https://api.github.com/users/craigayre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigayre/subscriptions","organizations_url":"https://api.github.com/users/craigayre/orgs","repos_url":"https://api.github.com/users/craigayre/repos","events_url":"https://api.github.com/users/craigayre/events{/privacy}","received_events_url":"https://api.github.com/users/craigayre/received_events","type":"User","site_admin":false},"body":"Could this also fail for other issues than just the token? E.g. network?\r\n\r\nShould we let the caller deal with the error (dispatching an error action) and warn in the UI if there was no slack token detected?","created_at":"2018-07-09T13:31:48Z","updated_at":"2018-07-09T13:38:19Z","html_url":"https://github.com/bin-nuance-bat/project/pull/52#discussion_r201002432","pull_request_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/comments/201002432"},"html":{"href":"https://github.com/bin-nuance-bat/project/pull/52#discussion_r201002432"},"pull_request":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52","id":200086741,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMDg2NzQx","html_url":"https://github.com/bin-nuance-bat/project/pull/52","diff_url":"https://github.com/bin-nuance-bat/project/pull/52.diff","patch_url":"https://github.com/bin-nuance-bat/project/pull/52.patch","issue_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/52","number":52,"state":"open","locked":false,"title":"New ML model and refactor app to use honesty.store IDs wherever possible","user":{"login":"cainy393","id":5376687,"node_id":"MDQ6VXNlcjUzNzY2ODc=","avatar_url":"https://avatars3.githubusercontent.com/u/5376687?v=4","gravatar_id":"","url":"https://api.github.com/users/cainy393","html_url":"https://github.com/cainy393","followers_url":"https://api.github.com/users/cainy393/followers","following_url":"https://api.github.com/users/cainy393/following{/other_user}","gists_url":"https://api.github.com/users/cainy393/gists{/gist_id}","starred_url":"https://api.github.com/users/cainy393/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cainy393/subscriptions","organizations_url":"https://api.github.com/users/cainy393/orgs","repos_url":"https://api.github.com/users/cainy393/repos","events_url":"https://api.github.com/users/cainy393/events{/privacy}","received_events_url":"https://api.github.com/users/cainy393/received_events","type":"User","site_admin":false},"body":"# Checklist:\r\n\r\nRelated work items: #2, #3 \r\n\r\nPreview url: https://honesty-store-kiosk-dev.firebaseapp.com\r\n\r\n- [x] Tests have been added for new functionality\r\n- [x] Work has been reviewed by other team members\r\n- [ ] Work has been reviewed by @craigayre or @eclennett\r\n","created_at":"2018-07-09T12:41:05Z","updated_at":"2018-07-09T13:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7daa0313f7c7080154f1889ec307090d730ea7d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52/commits","review_comments_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52/comments","review_comment_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/52/comments","statuses_url":"https://api.github.com/repos/bin-nuance-bat/project/statuses/8651d955f529c898ccb0aa8f64f99b5a539bed34","head":{"label":"bin-nuance-bat:ML","ref":"ML","sha":"8651d955f529c898ccb0aa8f64f99b5a539bed34","user":{"login":"bin-nuance-bat","id":40300476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/40300476?v=4","gravatar_id":"","url":"https://api.github.com/users/bin-nuance-bat","html_url":"https://github.com/bin-nuance-bat","followers_url":"https://api.github.com/users/bin-nuance-bat/followers","following_url":"https://api.github.com/users/bin-nuance-bat/following{/other_user}","gists_url":"https://api.github.com/users/bin-nuance-bat/gists{/gist_id}","starred_url":"https://api.github.com/users/bin-nuance-bat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bin-nuance-bat/subscriptions","organizations_url":"https://api.github.com/users/bin-nuance-bat/orgs","repos_url":"https://api.github.com/users/bin-nuance-bat/repos","events_url":"https://api.github.com/users/bin-nuance-bat/events{/privacy}","received_events_url":"https://api.github.com/users/bin-nuance-bat/received_events","type":"Organization","site_admin":false},"repo":{"id":138719101,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3MTkxMDE=","name":"project","full_name":"bin-nuance-bat/project","owner":{"login":"bin-nuance-bat","id":40300476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/40300476?v=4","gravatar_id":"","url":"https://api.github.com/users/bin-nuance-bat","html_url":"https://github.com/bin-nuance-bat","followers_url":"https://api.github.com/users/bin-nuance-bat/followers","following_url":"https://api.github.com/users/bin-nuance-bat/following{/other_user}","gists_url":"https://api.github.com/users/bin-nuance-bat/gists{/gist_id}","starred_url":"https://api.github.com/users/bin-nuance-bat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bin-nuance-bat/subscriptions","organizations_url":"https://api.github.com/users/bin-nuance-bat/orgs","repos_url":"https://api.github.com/users/bin-nuance-bat/repos","events_url":"https://api.github.com/users/bin-nuance-bat/events{/privacy}","received_events_url":"https://api.github.com/users/bin-nuance-bat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bin-nuance-bat/project","description":null,"fork":false,"url":"https://api.github.com/repos/bin-nuance-bat/project","forks_url":"https://api.github.com/repos/bin-nuance-bat/project/forks","keys_url":"https://api.github.com/repos/bin-nuance-bat/project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bin-nuance-bat/project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bin-nuance-bat/project/teams","hooks_url":"https://api.github.com/repos/bin-nuance-bat/project/hooks","issue_events_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/events{/number}","events_url":"https://api.github.com/repos/bin-nuance-bat/project/events","assignees_url":"https://api.github.com/repos/bin-nuance-bat/project/assignees{/user}","branches_url":"https://api.github.com/repos/bin-nuance-bat/project/branches{/branch}","tags_url":"https://api.github.com/repos/bin-nuance-bat/project/tags","blobs_url":"https://api.github.com/repos/bin-nuance-bat/project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bin-nuance-bat/project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bin-nuance-bat/project/git/refs{/sha}","trees_url":"https://api.github.com/repos/bin-nuance-bat/project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bin-nuance-bat/project/statuses/{sha}","languages_url":"https://api.github.com/repos/bin-nuance-bat/project/languages","stargazers_url":"https://api.github.com/repos/bin-nuance-bat/project/stargazers","contributors_url":"https://api.github.com/repos/bin-nuance-bat/project/contributors","subscribers_url":"https://api.github.com/repos/bin-nuance-bat/project/subscribers","subscription_url":"https://api.github.com/repos/bin-nuance-bat/project/subscription","commits_url":"https://api.github.com/repos/bin-nuance-bat/project/commits{/sha}","git_commits_url":"https://api.github.com/repos/bin-nuance-bat/project/git/commits{/sha}","comments_url":"https://api.github.com/repos/bin-nuance-bat/project/comments{/number}","issue_comment_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/comments{/number}","contents_url":"https://api.github.com/repos/bin-nuance-bat/project/contents/{+path}","compare_url":"https://api.github.com/repos/bin-nuance-bat/project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bin-nuance-bat/project/merges","archive_url":"https://api.github.com/repos/bin-nuance-bat/project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bin-nuance-bat/project/downloads","issues_url":"https://api.github.com/repos/bin-nuance-bat/project/issues{/number}","pulls_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls{/number}","milestones_url":"https://api.github.com/repos/bin-nuance-bat/project/milestones{/number}","notifications_url":"https://api.github.com/repos/bin-nuance-bat/project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bin-nuance-bat/project/labels{/name}","releases_url":"https://api.github.com/repos/bin-nuance-bat/project/releases{/id}","deployments_url":"https://api.github.com/repos/bin-nuance-bat/project/deployments","created_at":"2018-06-26T09:57:14Z","updated_at":"2018-07-09T10:05:46Z","pushed_at":"2018-07-09T13:17:58Z","git_url":"git://github.com/bin-nuance-bat/project.git","ssh_url":"git@github.com:bin-nuance-bat/project.git","clone_url":"https://github.com/bin-nuance-bat/project.git","svn_url":"https://github.com/bin-nuance-bat/project","homepage":null,"size":8963,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":3,"default_branch":"master"}},"base":{"label":"bin-nuance-bat:master","ref":"master","sha":"35d770de6e6a9ebc94fba10747810ef77f9c5456","user":{"login":"bin-nuance-bat","id":40300476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/40300476?v=4","gravatar_id":"","url":"https://api.github.com/users/bin-nuance-bat","html_url":"https://github.com/bin-nuance-bat","followers_url":"https://api.github.com/users/bin-nuance-bat/followers","following_url":"https://api.github.com/users/bin-nuance-bat/following{/other_user}","gists_url":"https://api.github.com/users/bin-nuance-bat/gists{/gist_id}","starred_url":"https://api.github.com/users/bin-nuance-bat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bin-nuance-bat/subscriptions","organizations_url":"https://api.github.com/users/bin-nuance-bat/orgs","repos_url":"https://api.github.com/users/bin-nuance-bat/repos","events_url":"https://api.github.com/users/bin-nuance-bat/events{/privacy}","received_events_url":"https://api.github.com/users/bin-nuance-bat/received_events","type":"Organization","site_admin":false},"repo":{"id":138719101,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3MTkxMDE=","name":"project","full_name":"bin-nuance-bat/project","owner":{"login":"bin-nuance-bat","id":40300476,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAwNDc2","avatar_url":"https://avatars3.githubusercontent.com/u/40300476?v=4","gravatar_id":"","url":"https://api.github.com/users/bin-nuance-bat","html_url":"https://github.com/bin-nuance-bat","followers_url":"https://api.github.com/users/bin-nuance-bat/followers","following_url":"https://api.github.com/users/bin-nuance-bat/following{/other_user}","gists_url":"https://api.github.com/users/bin-nuance-bat/gists{/gist_id}","starred_url":"https://api.github.com/users/bin-nuance-bat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bin-nuance-bat/subscriptions","organizations_url":"https://api.github.com/users/bin-nuance-bat/orgs","repos_url":"https://api.github.com/users/bin-nuance-bat/repos","events_url":"https://api.github.com/users/bin-nuance-bat/events{/privacy}","received_events_url":"https://api.github.com/users/bin-nuance-bat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bin-nuance-bat/project","description":null,"fork":false,"url":"https://api.github.com/repos/bin-nuance-bat/project","forks_url":"https://api.github.com/repos/bin-nuance-bat/project/forks","keys_url":"https://api.github.com/repos/bin-nuance-bat/project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bin-nuance-bat/project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bin-nuance-bat/project/teams","hooks_url":"https://api.github.com/repos/bin-nuance-bat/project/hooks","issue_events_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/events{/number}","events_url":"https://api.github.com/repos/bin-nuance-bat/project/events","assignees_url":"https://api.github.com/repos/bin-nuance-bat/project/assignees{/user}","branches_url":"https://api.github.com/repos/bin-nuance-bat/project/branches{/branch}","tags_url":"https://api.github.com/repos/bin-nuance-bat/project/tags","blobs_url":"https://api.github.com/repos/bin-nuance-bat/project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bin-nuance-bat/project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bin-nuance-bat/project/git/refs{/sha}","trees_url":"https://api.github.com/repos/bin-nuance-bat/project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bin-nuance-bat/project/statuses/{sha}","languages_url":"https://api.github.com/repos/bin-nuance-bat/project/languages","stargazers_url":"https://api.github.com/repos/bin-nuance-bat/project/stargazers","contributors_url":"https://api.github.com/repos/bin-nuance-bat/project/contributors","subscribers_url":"https://api.github.com/repos/bin-nuance-bat/project/subscribers","subscription_url":"https://api.github.com/repos/bin-nuance-bat/project/subscription","commits_url":"https://api.github.com/repos/bin-nuance-bat/project/commits{/sha}","git_commits_url":"https://api.github.com/repos/bin-nuance-bat/project/git/commits{/sha}","comments_url":"https://api.github.com/repos/bin-nuance-bat/project/comments{/number}","issue_comment_url":"https://api.github.com/repos/bin-nuance-bat/project/issues/comments{/number}","contents_url":"https://api.github.com/repos/bin-nuance-bat/project/contents/{+path}","compare_url":"https://api.github.com/repos/bin-nuance-bat/project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bin-nuance-bat/project/merges","archive_url":"https://api.github.com/repos/bin-nuance-bat/project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bin-nuance-bat/project/downloads","issues_url":"https://api.github.com/repos/bin-nuance-bat/project/issues{/number}","pulls_url":"https://api.github.com/repos/bin-nuance-bat/project/pulls{/number}","milestones_url":"https://api.github.com/repos/bin-nuance-bat/project/milestones{/number}","notifications_url":"https://api.github.com/repos/bin-nuance-bat/project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bin-nuance-bat/project/labels{/name}","releases_url":"https://api.github.com/repos/bin-nuance-bat/project/releases{/id}","deployments_url":"https://api.github.com/repos/bin-nuance-bat/project/deployments","created_at":"2018-06-26T09:57:14Z","updated_at":"2018-07-09T10:05:46Z","pushed_at":"2018-07-09T13:17:58Z","git_url":"git://github.com/bin-nuance-bat/project.git","ssh_url":"git@github.com:bin-nuance-bat/project.git","clone_url":"https://github.com/bin-nuance-bat/project.git","svn_url":"https://github.com/bin-nuance-bat/project","homepage":null,"size":8963,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":0,"open_issues":15,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52"},"html":{"href":"https://github.com/bin-nuance-bat/project/pull/52"},"issue":{"href":"https://api.github.com/repos/bin-nuance-bat/project/issues/52"},"comments":{"href":"https://api.github.com/repos/bin-nuance-bat/project/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bin-nuance-bat/project/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/bin-nuance-bat/project/statuses/8651d955f529c898ccb0aa8f64f99b5a539bed34"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"craigayre"}}