{"action":"created","comment":{"url":"https://api.github.com/repos/salesforce/refocus/pulls/comments/157125901","pull_request_review_id":83718688,"id":157125901,"diff_hunk":"@@ -0,0 +1,168 @@\n+/**\n+ * Copyright (c) 2017, salesforce.com, inc.\n+ * All rights reserved.\n+ * Licensed under the BSD 3-Clause license.\n+ * For full license text, see LICENSE.txt file in the repo root or\n+ * https://opensource.org/licenses/BSD-3-Clause\n+ */\n+\n+/**\n+ * db/helpers/botDataUtils.js\n+ *\n+ * Used by the Bot Data model.\n+ */\n+const _ = require('lodash');\n+const ZERO = 0;\n+const ONE = 1;\n+const TWO = 2;\n+\n+/**\n+ * Check if a string is a JSON\n+ *\n+ * @param {String} item - String to check\n+ * @returns {Boolean} - if String is JSON\n+ */\n+function isJson(item) {","path":"db/helpers/botDataUtils.js","position":25,"original_position":25,"commit_id":"29152f5d0714e8decbf1af209ef0ee5e03ed9616","original_commit_id":"9d70e82b74767a6a57e459e870099763449f99b0","user":{"login":"tausifmuzaffar","id":17050488,"avatar_url":"https://avatars0.githubusercontent.com/u/17050488?v=4","gravatar_id":"","url":"https://api.github.com/users/tausifmuzaffar","html_url":"https://github.com/tausifmuzaffar","followers_url":"https://api.github.com/users/tausifmuzaffar/followers","following_url":"https://api.github.com/users/tausifmuzaffar/following{/other_user}","gists_url":"https://api.github.com/users/tausifmuzaffar/gists{/gist_id}","starred_url":"https://api.github.com/users/tausifmuzaffar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tausifmuzaffar/subscriptions","organizations_url":"https://api.github.com/users/tausifmuzaffar/orgs","repos_url":"https://api.github.com/users/tausifmuzaffar/repos","events_url":"https://api.github.com/users/tausifmuzaffar/events{/privacy}","received_events_url":"https://api.github.com/users/tausifmuzaffar/received_events","type":"User","site_admin":false},"body":"I tried this package but it doesnt seem to be as good at the code i wrote it return false for this string\r\n\r\n{ response: 'this is a {$TestBot1.response$}' }","created_at":"2017-12-15T05:22:00Z","updated_at":"2017-12-15T05:22:00Z","html_url":"https://github.com/salesforce/refocus/pull/708#discussion_r157125901","pull_request_url":"https://api.github.com/repos/salesforce/refocus/pulls/708","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/comments/157125901"},"html":{"href":"https://github.com/salesforce/refocus/pull/708#discussion_r157125901"},"pull_request":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/708"}},"in_reply_to_id":157092802},"pull_request":{"url":"https://api.github.com/repos/salesforce/refocus/pulls/708","id":158273637,"html_url":"https://github.com/salesforce/refocus/pull/708","diff_url":"https://github.com/salesforce/refocus/pull/708.diff","patch_url":"https://github.com/salesforce/refocus/pull/708.patch","issue_url":"https://api.github.com/repos/salesforce/refocus/issues/708","number":708,"state":"open","locked":false,"title":"BotData Shared Context","user":{"login":"tausifmuzaffar","id":17050488,"avatar_url":"https://avatars0.githubusercontent.com/u/17050488?v=4","gravatar_id":"","url":"https://api.github.com/users/tausifmuzaffar","html_url":"https://github.com/tausifmuzaffar","followers_url":"https://api.github.com/users/tausifmuzaffar/followers","following_url":"https://api.github.com/users/tausifmuzaffar/following{/other_user}","gists_url":"https://api.github.com/users/tausifmuzaffar/gists{/gist_id}","starred_url":"https://api.github.com/users/tausifmuzaffar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tausifmuzaffar/subscriptions","organizations_url":"https://api.github.com/users/tausifmuzaffar/orgs","repos_url":"https://api.github.com/users/tausifmuzaffar/repos","events_url":"https://api.github.com/users/tausifmuzaffar/events{/privacy}","received_events_url":"https://api.github.com/users/tausifmuzaffar/received_events","type":"User","site_admin":false},"body":"We want to be able to sync data between bots when we specified its allowed to do it in the room settings.\r\n\r\nThe workflow is like this: Room Defines Bot1 must sync with Bot2 -> Bot1 BotData is created/updated -> we determine if we need to sync -> create/update Bot2 BotData","created_at":"2017-12-14T05:49:25Z","updated_at":"2017-12-15T05:22:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8992e33cd97c9c1924209b7a1654f31749d46ee","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kamilsmuga","id":4013329,"avatar_url":"https://avatars2.githubusercontent.com/u/4013329?v=4","gravatar_id":"","url":"https://api.github.com/users/kamilsmuga","html_url":"https://github.com/kamilsmuga","followers_url":"https://api.github.com/users/kamilsmuga/followers","following_url":"https://api.github.com/users/kamilsmuga/following{/other_user}","gists_url":"https://api.github.com/users/kamilsmuga/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilsmuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilsmuga/subscriptions","organizations_url":"https://api.github.com/users/kamilsmuga/orgs","repos_url":"https://api.github.com/users/kamilsmuga/repos","events_url":"https://api.github.com/users/kamilsmuga/events{/privacy}","received_events_url":"https://api.github.com/users/kamilsmuga/received_events","type":"User","site_admin":false},{"login":"BrandonMurnane","id":6997957,"avatar_url":"https://avatars0.githubusercontent.com/u/6997957?v=4","gravatar_id":"","url":"https://api.github.com/users/BrandonMurnane","html_url":"https://github.com/BrandonMurnane","followers_url":"https://api.github.com/users/BrandonMurnane/followers","following_url":"https://api.github.com/users/BrandonMurnane/following{/other_user}","gists_url":"https://api.github.com/users/BrandonMurnane/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonMurnane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonMurnane/subscriptions","organizations_url":"https://api.github.com/users/BrandonMurnane/orgs","repos_url":"https://api.github.com/users/BrandonMurnane/repos","events_url":"https://api.github.com/users/BrandonMurnane/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonMurnane/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/salesforce/refocus/pulls/708/commits","review_comments_url":"https://api.github.com/repos/salesforce/refocus/pulls/708/comments","review_comment_url":"https://api.github.com/repos/salesforce/refocus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salesforce/refocus/issues/708/comments","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/29152f5d0714e8decbf1af209ef0ee5e03ed9616","head":{"label":"salesforce:sharedContext","ref":"sharedContext","sha":"29152f5d0714e8decbf1af209ef0ee5e03ed9616","user":{"login":"salesforce","id":453694,"avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":64511432,"name":"refocus","full_name":"salesforce/refocus","owner":{"login":"salesforce","id":453694,"avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus","description":"The Go-To Platform for Visualizing Service Health","fork":false,"url":"https://api.github.com/repos/salesforce/refocus","forks_url":"https://api.github.com/repos/salesforce/refocus/forks","keys_url":"https://api.github.com/repos/salesforce/refocus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus/events","assignees_url":"https://api.github.com/repos/salesforce/refocus/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus/merges","archive_url":"https://api.github.com/repos/salesforce/refocus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus/deployments","created_at":"2016-07-29T21:27:40Z","updated_at":"2017-11-20T13:40:48Z","pushed_at":"2017-12-15T05:19:52Z","git_url":"git://github.com/salesforce/refocus.git","ssh_url":"git@github.com:salesforce/refocus.git","clone_url":"https://github.com/salesforce/refocus.git","svn_url":"https://github.com/salesforce/refocus","homepage":"https://salesforce.github.io/refocus/docs/01-quickstart.html","size":9325,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":17,"open_issues":14,"watchers":53,"default_branch":"master"}},"base":{"label":"salesforce:master","ref":"master","sha":"d9fc1d8b33d5d8502f2ce7aefeee150df35d4500","user":{"login":"salesforce","id":453694,"avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"repo":{"id":64511432,"name":"refocus","full_name":"salesforce/refocus","owner":{"login":"salesforce","id":453694,"avatar_url":"https://avatars3.githubusercontent.com/u/453694?v=4","gravatar_id":"","url":"https://api.github.com/users/salesforce","html_url":"https://github.com/salesforce","followers_url":"https://api.github.com/users/salesforce/followers","following_url":"https://api.github.com/users/salesforce/following{/other_user}","gists_url":"https://api.github.com/users/salesforce/gists{/gist_id}","starred_url":"https://api.github.com/users/salesforce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salesforce/subscriptions","organizations_url":"https://api.github.com/users/salesforce/orgs","repos_url":"https://api.github.com/users/salesforce/repos","events_url":"https://api.github.com/users/salesforce/events{/privacy}","received_events_url":"https://api.github.com/users/salesforce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salesforce/refocus","description":"The Go-To Platform for Visualizing Service Health","fork":false,"url":"https://api.github.com/repos/salesforce/refocus","forks_url":"https://api.github.com/repos/salesforce/refocus/forks","keys_url":"https://api.github.com/repos/salesforce/refocus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salesforce/refocus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salesforce/refocus/teams","hooks_url":"https://api.github.com/repos/salesforce/refocus/hooks","issue_events_url":"https://api.github.com/repos/salesforce/refocus/issues/events{/number}","events_url":"https://api.github.com/repos/salesforce/refocus/events","assignees_url":"https://api.github.com/repos/salesforce/refocus/assignees{/user}","branches_url":"https://api.github.com/repos/salesforce/refocus/branches{/branch}","tags_url":"https://api.github.com/repos/salesforce/refocus/tags","blobs_url":"https://api.github.com/repos/salesforce/refocus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salesforce/refocus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salesforce/refocus/git/refs{/sha}","trees_url":"https://api.github.com/repos/salesforce/refocus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salesforce/refocus/statuses/{sha}","languages_url":"https://api.github.com/repos/salesforce/refocus/languages","stargazers_url":"https://api.github.com/repos/salesforce/refocus/stargazers","contributors_url":"https://api.github.com/repos/salesforce/refocus/contributors","subscribers_url":"https://api.github.com/repos/salesforce/refocus/subscribers","subscription_url":"https://api.github.com/repos/salesforce/refocus/subscription","commits_url":"https://api.github.com/repos/salesforce/refocus/commits{/sha}","git_commits_url":"https://api.github.com/repos/salesforce/refocus/git/commits{/sha}","comments_url":"https://api.github.com/repos/salesforce/refocus/comments{/number}","issue_comment_url":"https://api.github.com/repos/salesforce/refocus/issues/comments{/number}","contents_url":"https://api.github.com/repos/salesforce/refocus/contents/{+path}","compare_url":"https://api.github.com/repos/salesforce/refocus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salesforce/refocus/merges","archive_url":"https://api.github.com/repos/salesforce/refocus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salesforce/refocus/downloads","issues_url":"https://api.github.com/repos/salesforce/refocus/issues{/number}","pulls_url":"https://api.github.com/repos/salesforce/refocus/pulls{/number}","milestones_url":"https://api.github.com/repos/salesforce/refocus/milestones{/number}","notifications_url":"https://api.github.com/repos/salesforce/refocus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salesforce/refocus/labels{/name}","releases_url":"https://api.github.com/repos/salesforce/refocus/releases{/id}","deployments_url":"https://api.github.com/repos/salesforce/refocus/deployments","created_at":"2016-07-29T21:27:40Z","updated_at":"2017-11-20T13:40:48Z","pushed_at":"2017-12-15T05:19:52Z","git_url":"git://github.com/salesforce/refocus.git","ssh_url":"git@github.com:salesforce/refocus.git","clone_url":"https://github.com/salesforce/refocus.git","svn_url":"https://github.com/salesforce/refocus","homepage":"https://salesforce.github.io/refocus/docs/01-quickstart.html","size":9325,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":17,"open_issues":14,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/708"},"html":{"href":"https://github.com/salesforce/refocus/pull/708"},"issue":{"href":"https://api.github.com/repos/salesforce/refocus/issues/708"},"comments":{"href":"https://api.github.com/repos/salesforce/refocus/issues/708/comments"},"review_comments":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/708/comments"},"review_comment":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salesforce/refocus/pulls/708/commits"},"statuses":{"href":"https://api.github.com/repos/salesforce/refocus/statuses/29152f5d0714e8decbf1af209ef0ee5e03ed9616"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tausifmuzaffar"}}