{"action":"created","comment":{"url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/comments/123308188","pull_request_review_id":45498812,"id":123308188,"diff_hunk":"@@ -0,0 +1,43 @@\n+const chance = require('./fake-chance').instance;\n+\n+// proxy event listener to make testing easier\n+const oldFetch = window.fetch;\n+window.fetch = (path, options) => {\n+    if (path.indexOf('/glimpse/context') > -1) {\n+        return new Promise(resolve => fetchContext(resolve));\n+    }\n+\n+    return oldFetch(path, options);\n+};\n+\n+function fetchContext(resolve) {\n+    setTimeout(() => {\n+        const totalHttpClient = chance.integerRange(0, 3);\n+        const totalDataStore = chance.integerRange(0, 5);\n+\n+        const result = [];\n+        createMessages('data-http-response', totalHttpClient, result);\n+        createMessages('data-store-end', totalDataStore, result);\n+\n+        var response = {\n+            'ok' : true,\n+            'json': () => new Promise(resolve => resolve(result))\n+        };\n+\n+        resolve(response);\n+    }, chance.integerRange(100, 500));\n+}\n+\n+function createMessages(type, total, collection) {\n+    for (var i = 0; i < total; i++) {\n+        collection.push(createMessage(type));","path":"fake/fake-data.js","position":33,"original_position":33,"commit_id":"20180b4ed4ee979ae714b30acb5651428374a861","original_commit_id":"20180b4ed4ee979ae714b30acb5651428374a861","user":{"login":"davidkpiano","id":1093738,"avatar_url":"https://avatars1.githubusercontent.com/u/1093738?v=3","gravatar_id":"","url":"https://api.github.com/users/davidkpiano","html_url":"https://github.com/davidkpiano","followers_url":"https://api.github.com/users/davidkpiano/followers","following_url":"https://api.github.com/users/davidkpiano/following{/other_user}","gists_url":"https://api.github.com/users/davidkpiano/gists{/gist_id}","starred_url":"https://api.github.com/users/davidkpiano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidkpiano/subscriptions","organizations_url":"https://api.github.com/users/davidkpiano/orgs","repos_url":"https://api.github.com/users/davidkpiano/repos","events_url":"https://api.github.com/users/davidkpiano/events{/privacy}","received_events_url":"https://api.github.com/users/davidkpiano/received_events","type":"User","site_admin":false},"body":"Sort of black-boxy... why can't `createMessages` just return a new collection instead of mutating?\r\n\r\n(I know, I know, I like being pure)","created_at":"2017-06-21T17:04:47Z","updated_at":"2017-06-21T17:04:47Z","html_url":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111#discussion_r123308188","pull_request_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/comments/123308188"},"html":{"href":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111#discussion_r123308188"},"pull_request":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111","id":126771379,"html_url":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111","diff_url":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111.diff","patch_url":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111.patch","issue_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/111","number":111,"state":"open","locked":false,"title":"[Data] Adds summary of http client and data store calls","user":{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars2.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false},"body":"![jun-21-2017 06-53-53](https://user-images.githubusercontent.com/585619/27388053-37ab9a58-564f-11e7-84a6-2a511e6246df.gif)\r\n","created_at":"2017-06-21T14:01:03Z","updated_at":"2017-06-21T17:04:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b07291b1d85cf57572aea5dc21eb458c55c25310","assignee":{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars2.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false},"assignees":[{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars2.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/milestones/12","html_url":"https://github.com/Glimpse/Glimpse.Client.Hud/milestone/12","labels_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/milestones/12/labels","id":2541378,"number":12,"title":"M022","description":"","creator":{"login":"avanderhoorn","id":585619,"avatar_url":"https://avatars2.githubusercontent.com/u/585619?v=3","gravatar_id":"","url":"https://api.github.com/users/avanderhoorn","html_url":"https://github.com/avanderhoorn","followers_url":"https://api.github.com/users/avanderhoorn/followers","following_url":"https://api.github.com/users/avanderhoorn/following{/other_user}","gists_url":"https://api.github.com/users/avanderhoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/avanderhoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avanderhoorn/subscriptions","organizations_url":"https://api.github.com/users/avanderhoorn/orgs","repos_url":"https://api.github.com/users/avanderhoorn/repos","events_url":"https://api.github.com/users/avanderhoorn/events{/privacy}","received_events_url":"https://api.github.com/users/avanderhoorn/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":12,"state":"open","created_at":"2017-05-24T18:46:07Z","updated_at":"2017-06-21T14:01:03Z","due_on":"2017-06-30T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111/commits","review_comments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111/comments","review_comment_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/111/comments","statuses_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/statuses/20180b4ed4ee979ae714b30acb5651428374a861","head":{"label":"Glimpse:avanderhoorn-data-section","ref":"avanderhoorn-data-section","sha":"20180b4ed4ee979ae714b30acb5651428374a861","user":{"login":"Glimpse","id":585916,"avatar_url":"https://avatars2.githubusercontent.com/u/585916?v=3","gravatar_id":"","url":"https://api.github.com/users/Glimpse","html_url":"https://github.com/Glimpse","followers_url":"https://api.github.com/users/Glimpse/followers","following_url":"https://api.github.com/users/Glimpse/following{/other_user}","gists_url":"https://api.github.com/users/Glimpse/gists{/gist_id}","starred_url":"https://api.github.com/users/Glimpse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glimpse/subscriptions","organizations_url":"https://api.github.com/users/Glimpse/orgs","repos_url":"https://api.github.com/users/Glimpse/repos","events_url":"https://api.github.com/users/Glimpse/events{/privacy}","received_events_url":"https://api.github.com/users/Glimpse/received_events","type":"Organization","site_admin":false},"repo":{"id":68042330,"name":"Glimpse.Client.Hud","full_name":"Glimpse/Glimpse.Client.Hud","owner":{"login":"Glimpse","id":585916,"avatar_url":"https://avatars2.githubusercontent.com/u/585916?v=3","gravatar_id":"","url":"https://api.github.com/users/Glimpse","html_url":"https://github.com/Glimpse","followers_url":"https://api.github.com/users/Glimpse/followers","following_url":"https://api.github.com/users/Glimpse/following{/other_user}","gists_url":"https://api.github.com/users/Glimpse/gists{/gist_id}","starred_url":"https://api.github.com/users/Glimpse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glimpse/subscriptions","organizations_url":"https://api.github.com/users/Glimpse/orgs","repos_url":"https://api.github.com/users/Glimpse/repos","events_url":"https://api.github.com/users/Glimpse/events{/privacy}","received_events_url":"https://api.github.com/users/Glimpse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Glimpse/Glimpse.Client.Hud","description":"Glimpse Client - Heads-up-display (embedded client)","fork":false,"url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud","forks_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/forks","keys_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/teams","hooks_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/hooks","issue_events_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/events{/number}","events_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/events","assignees_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/assignees{/user}","branches_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/branches{/branch}","tags_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/tags","blobs_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/refs{/sha}","trees_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/statuses/{sha}","languages_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/languages","stargazers_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/stargazers","contributors_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/contributors","subscribers_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/subscribers","subscription_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/subscription","commits_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/commits{/sha}","git_commits_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/commits{/sha}","comments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/comments{/number}","issue_comment_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/comments{/number}","contents_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/contents/{+path}","compare_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/merges","archive_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/downloads","issues_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues{/number}","pulls_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls{/number}","milestones_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/milestones{/number}","notifications_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/labels{/name}","releases_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/releases{/id}","deployments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/deployments","created_at":"2016-09-12T19:51:03Z","updated_at":"2017-02-15T23:48:24Z","pushed_at":"2017-06-21T14:01:04Z","git_url":"git://github.com/Glimpse/Glimpse.Client.Hud.git","ssh_url":"git@github.com:Glimpse/Glimpse.Client.Hud.git","clone_url":"https://github.com/Glimpse/Glimpse.Client.Hud.git","svn_url":"https://github.com/Glimpse/Glimpse.Client.Hud","homepage":null,"size":615,"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,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":3,"default_branch":"dev"}},"base":{"label":"Glimpse:dev","ref":"dev","sha":"f18d727ba3bd8da7d1478b48be3c0b0aabf59b82","user":{"login":"Glimpse","id":585916,"avatar_url":"https://avatars2.githubusercontent.com/u/585916?v=3","gravatar_id":"","url":"https://api.github.com/users/Glimpse","html_url":"https://github.com/Glimpse","followers_url":"https://api.github.com/users/Glimpse/followers","following_url":"https://api.github.com/users/Glimpse/following{/other_user}","gists_url":"https://api.github.com/users/Glimpse/gists{/gist_id}","starred_url":"https://api.github.com/users/Glimpse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glimpse/subscriptions","organizations_url":"https://api.github.com/users/Glimpse/orgs","repos_url":"https://api.github.com/users/Glimpse/repos","events_url":"https://api.github.com/users/Glimpse/events{/privacy}","received_events_url":"https://api.github.com/users/Glimpse/received_events","type":"Organization","site_admin":false},"repo":{"id":68042330,"name":"Glimpse.Client.Hud","full_name":"Glimpse/Glimpse.Client.Hud","owner":{"login":"Glimpse","id":585916,"avatar_url":"https://avatars2.githubusercontent.com/u/585916?v=3","gravatar_id":"","url":"https://api.github.com/users/Glimpse","html_url":"https://github.com/Glimpse","followers_url":"https://api.github.com/users/Glimpse/followers","following_url":"https://api.github.com/users/Glimpse/following{/other_user}","gists_url":"https://api.github.com/users/Glimpse/gists{/gist_id}","starred_url":"https://api.github.com/users/Glimpse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glimpse/subscriptions","organizations_url":"https://api.github.com/users/Glimpse/orgs","repos_url":"https://api.github.com/users/Glimpse/repos","events_url":"https://api.github.com/users/Glimpse/events{/privacy}","received_events_url":"https://api.github.com/users/Glimpse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Glimpse/Glimpse.Client.Hud","description":"Glimpse Client - Heads-up-display (embedded client)","fork":false,"url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud","forks_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/forks","keys_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/teams","hooks_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/hooks","issue_events_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/events{/number}","events_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/events","assignees_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/assignees{/user}","branches_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/branches{/branch}","tags_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/tags","blobs_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/refs{/sha}","trees_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/statuses/{sha}","languages_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/languages","stargazers_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/stargazers","contributors_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/contributors","subscribers_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/subscribers","subscription_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/subscription","commits_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/commits{/sha}","git_commits_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/git/commits{/sha}","comments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/comments{/number}","issue_comment_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/comments{/number}","contents_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/contents/{+path}","compare_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/merges","archive_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/downloads","issues_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues{/number}","pulls_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls{/number}","milestones_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/milestones{/number}","notifications_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/labels{/name}","releases_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/releases{/id}","deployments_url":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/deployments","created_at":"2016-09-12T19:51:03Z","updated_at":"2017-02-15T23:48:24Z","pushed_at":"2017-06-21T14:01:04Z","git_url":"git://github.com/Glimpse/Glimpse.Client.Hud.git","ssh_url":"git@github.com:Glimpse/Glimpse.Client.Hud.git","clone_url":"https://github.com/Glimpse/Glimpse.Client.Hud.git","svn_url":"https://github.com/Glimpse/Glimpse.Client.Hud","homepage":null,"size":615,"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,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":3,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111"},"html":{"href":"https://github.com/Glimpse/Glimpse.Client.Hud/pull/111"},"issue":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/111"},"comments":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/Glimpse/Glimpse.Client.Hud/statuses/20180b4ed4ee979ae714b30acb5651428374a861"}}}}
{"actor":{"display_login":"davidkpiano"}}