{"action":"created","comment":{"url":"https://api.github.com/repos/ftlabs/overview/pulls/comments/232205025","pull_request_review_id":173350148,"id":232205025,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjIwNTAyNQ==","diff_hunk":"@@ -129,4 +130,129 @@ router.get('/test', async (req, res, next) => {\n \t});\n });\n \n+function prepAnnotationsGroup( groupName, annoPairs, groupDetails, searchResponse ){\n+  const group = {\n+    name : groupName,\n+    byCount : {\n+      topAnnotations : [],\n+      annotationsBubblingUnder : [],\n+    },\n+  };\n+\n+  group.byCount.topAnnotations = annoPairs\n+  .filter( pair => { return pair[1] > 1; }) // just those with count > 1\n+  .map( pair => { // bring together details, incl list of articles\n+    const name      = pair[0];\n+    const count     = pair[1];\n+    const uuids     = groupDetails.uuidsGroupedByItem[name];\n+    const articles  = uuids.map( uuid => { return searchResponse.articlesByUuid[uuid]; });\n+    articles.forEach( article => {\n+      if (article.mainImage\n+        && article.mainImage.members\n+        && article.mainImage.members.length > 0 ) {\n+          article.mainImage.thumbnailUrl = image.formatImageUrl(article.mainImage.members[0], 200);\n+      }\n+    });\n+\n+    return {\n+      name,\n+      count,\n+      uuids,\n+      articles,\n+    }\n+  })\n+  ;\n+\n+  group.byCount.annotationsBubblingUnder = annoPairs\n+  .filter( pair => { return pair[1] == 1; })","path":"routes/sapiV1CapiV2.js","position":46,"original_position":46,"commit_id":"7fc19883b946d5126369585f44403a51419d0f91","original_commit_id":"7fc19883b946d5126369585f44403a51419d0f91","user":{"login":"Lily2point0","id":3882381,"node_id":"MDQ6VXNlcjM4ODIzODE=","avatar_url":"https://avatars3.githubusercontent.com/u/3882381?v=4","gravatar_id":"","url":"https://api.github.com/users/Lily2point0","html_url":"https://github.com/Lily2point0","followers_url":"https://api.github.com/users/Lily2point0/followers","following_url":"https://api.github.com/users/Lily2point0/following{/other_user}","gists_url":"https://api.github.com/users/Lily2point0/gists{/gist_id}","starred_url":"https://api.github.com/users/Lily2point0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lily2point0/subscriptions","organizations_url":"https://api.github.com/users/Lily2point0/orgs","repos_url":"https://api.github.com/users/Lily2point0/repos","events_url":"https://api.github.com/users/Lily2point0/events{/privacy}","received_events_url":"https://api.github.com/users/Lily2point0/received_events","type":"User","site_admin":false},"body":"Similarly, `parseInt()` and use a strict equality","created_at":"2018-11-09T10:21:19Z","updated_at":"2018-11-09T10:21:19Z","html_url":"https://github.com/ftlabs/overview/pull/31#discussion_r232205025","pull_request_url":"https://api.github.com/repos/ftlabs/overview/pulls/31","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/comments/232205025"},"html":{"href":"https://github.com/ftlabs/overview/pull/31#discussion_r232205025"},"pull_request":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/ftlabs/overview/pulls/31","id":229628666,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NjI4NjY2","html_url":"https://github.com/ftlabs/overview/pull/31","diff_url":"https://github.com/ftlabs/overview/pull/31.diff","patch_url":"https://github.com/ftlabs/overview/pull/31.patch","issue_url":"https://api.github.com/repos/ftlabs/overview/issues/31","number":31,"state":"open","locked":false,"title":"Capisapidisplay","user":{"login":"railsagainstignorance","id":250310,"node_id":"MDQ6VXNlcjI1MDMxMA==","avatar_url":"https://avatars1.githubusercontent.com/u/250310?v=4","gravatar_id":"","url":"https://api.github.com/users/railsagainstignorance","html_url":"https://github.com/railsagainstignorance","followers_url":"https://api.github.com/users/railsagainstignorance/followers","following_url":"https://api.github.com/users/railsagainstignorance/following{/other_user}","gists_url":"https://api.github.com/users/railsagainstignorance/gists{/gist_id}","starred_url":"https://api.github.com/users/railsagainstignorance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/railsagainstignorance/subscriptions","organizations_url":"https://api.github.com/users/railsagainstignorance/orgs","repos_url":"https://api.github.com/users/railsagainstignorance/repos","events_url":"https://api.github.com/users/railsagainstignorance/events{/privacy}","received_events_url":"https://api.github.com/users/railsagainstignorance/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-09T09:06:42Z","updated_at":"2018-11-09T10:21:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d4f2f03cb18b701597c997857001ad2f6668a8f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ftlabs/overview/pulls/31/commits","review_comments_url":"https://api.github.com/repos/ftlabs/overview/pulls/31/comments","review_comment_url":"https://api.github.com/repos/ftlabs/overview/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ftlabs/overview/issues/31/comments","statuses_url":"https://api.github.com/repos/ftlabs/overview/statuses/7fc19883b946d5126369585f44403a51419d0f91","head":{"label":"ftlabs:capisapidisplay","ref":"capisapidisplay","sha":"7fc19883b946d5126369585f44403a51419d0f91","user":{"login":"ftlabs","id":1432696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1432696?v=4","gravatar_id":"","url":"https://api.github.com/users/ftlabs","html_url":"https://github.com/ftlabs","followers_url":"https://api.github.com/users/ftlabs/followers","following_url":"https://api.github.com/users/ftlabs/following{/other_user}","gists_url":"https://api.github.com/users/ftlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ftlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftlabs/subscriptions","organizations_url":"https://api.github.com/users/ftlabs/orgs","repos_url":"https://api.github.com/users/ftlabs/repos","events_url":"https://api.github.com/users/ftlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ftlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":143861158,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NjExNTg=","name":"overview","full_name":"ftlabs/overview","private":false,"owner":{"login":"ftlabs","id":1432696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1432696?v=4","gravatar_id":"","url":"https://api.github.com/users/ftlabs","html_url":"https://github.com/ftlabs","followers_url":"https://api.github.com/users/ftlabs/followers","following_url":"https://api.github.com/users/ftlabs/following{/other_user}","gists_url":"https://api.github.com/users/ftlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ftlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftlabs/subscriptions","organizations_url":"https://api.github.com/users/ftlabs/orgs","repos_url":"https://api.github.com/users/ftlabs/repos","events_url":"https://api.github.com/users/ftlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ftlabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ftlabs/overview","description":"Exploration(s) of summarising and displaying news","fork":false,"url":"https://api.github.com/repos/ftlabs/overview","forks_url":"https://api.github.com/repos/ftlabs/overview/forks","keys_url":"https://api.github.com/repos/ftlabs/overview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ftlabs/overview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ftlabs/overview/teams","hooks_url":"https://api.github.com/repos/ftlabs/overview/hooks","issue_events_url":"https://api.github.com/repos/ftlabs/overview/issues/events{/number}","events_url":"https://api.github.com/repos/ftlabs/overview/events","assignees_url":"https://api.github.com/repos/ftlabs/overview/assignees{/user}","branches_url":"https://api.github.com/repos/ftlabs/overview/branches{/branch}","tags_url":"https://api.github.com/repos/ftlabs/overview/tags","blobs_url":"https://api.github.com/repos/ftlabs/overview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ftlabs/overview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ftlabs/overview/git/refs{/sha}","trees_url":"https://api.github.com/repos/ftlabs/overview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ftlabs/overview/statuses/{sha}","languages_url":"https://api.github.com/repos/ftlabs/overview/languages","stargazers_url":"https://api.github.com/repos/ftlabs/overview/stargazers","contributors_url":"https://api.github.com/repos/ftlabs/overview/contributors","subscribers_url":"https://api.github.com/repos/ftlabs/overview/subscribers","subscription_url":"https://api.github.com/repos/ftlabs/overview/subscription","commits_url":"https://api.github.com/repos/ftlabs/overview/commits{/sha}","git_commits_url":"https://api.github.com/repos/ftlabs/overview/git/commits{/sha}","comments_url":"https://api.github.com/repos/ftlabs/overview/comments{/number}","issue_comment_url":"https://api.github.com/repos/ftlabs/overview/issues/comments{/number}","contents_url":"https://api.github.com/repos/ftlabs/overview/contents/{+path}","compare_url":"https://api.github.com/repos/ftlabs/overview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ftlabs/overview/merges","archive_url":"https://api.github.com/repos/ftlabs/overview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ftlabs/overview/downloads","issues_url":"https://api.github.com/repos/ftlabs/overview/issues{/number}","pulls_url":"https://api.github.com/repos/ftlabs/overview/pulls{/number}","milestones_url":"https://api.github.com/repos/ftlabs/overview/milestones{/number}","notifications_url":"https://api.github.com/repos/ftlabs/overview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ftlabs/overview/labels{/name}","releases_url":"https://api.github.com/repos/ftlabs/overview/releases{/id}","deployments_url":"https://api.github.com/repos/ftlabs/overview/deployments","created_at":"2018-08-07T11:02:52Z","updated_at":"2018-11-06T15:53:40Z","pushed_at":"2018-11-09T09:17:14Z","git_url":"git://github.com/ftlabs/overview.git","ssh_url":"git@github.com:ftlabs/overview.git","clone_url":"https://github.com/ftlabs/overview.git","svn_url":"https://github.com/ftlabs/overview","homepage":null,"size":764,"stargazers_count":2,"watchers_count":2,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"ftlabs:master","ref":"master","sha":"67332354f3c21c7000ecf7c2565f733a06d080a1","user":{"login":"ftlabs","id":1432696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1432696?v=4","gravatar_id":"","url":"https://api.github.com/users/ftlabs","html_url":"https://github.com/ftlabs","followers_url":"https://api.github.com/users/ftlabs/followers","following_url":"https://api.github.com/users/ftlabs/following{/other_user}","gists_url":"https://api.github.com/users/ftlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ftlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftlabs/subscriptions","organizations_url":"https://api.github.com/users/ftlabs/orgs","repos_url":"https://api.github.com/users/ftlabs/repos","events_url":"https://api.github.com/users/ftlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ftlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":143861158,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NjExNTg=","name":"overview","full_name":"ftlabs/overview","private":false,"owner":{"login":"ftlabs","id":1432696,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI2OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1432696?v=4","gravatar_id":"","url":"https://api.github.com/users/ftlabs","html_url":"https://github.com/ftlabs","followers_url":"https://api.github.com/users/ftlabs/followers","following_url":"https://api.github.com/users/ftlabs/following{/other_user}","gists_url":"https://api.github.com/users/ftlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ftlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftlabs/subscriptions","organizations_url":"https://api.github.com/users/ftlabs/orgs","repos_url":"https://api.github.com/users/ftlabs/repos","events_url":"https://api.github.com/users/ftlabs/events{/privacy}","received_events_url":"https://api.github.com/users/ftlabs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ftlabs/overview","description":"Exploration(s) of summarising and displaying news","fork":false,"url":"https://api.github.com/repos/ftlabs/overview","forks_url":"https://api.github.com/repos/ftlabs/overview/forks","keys_url":"https://api.github.com/repos/ftlabs/overview/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ftlabs/overview/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ftlabs/overview/teams","hooks_url":"https://api.github.com/repos/ftlabs/overview/hooks","issue_events_url":"https://api.github.com/repos/ftlabs/overview/issues/events{/number}","events_url":"https://api.github.com/repos/ftlabs/overview/events","assignees_url":"https://api.github.com/repos/ftlabs/overview/assignees{/user}","branches_url":"https://api.github.com/repos/ftlabs/overview/branches{/branch}","tags_url":"https://api.github.com/repos/ftlabs/overview/tags","blobs_url":"https://api.github.com/repos/ftlabs/overview/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ftlabs/overview/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ftlabs/overview/git/refs{/sha}","trees_url":"https://api.github.com/repos/ftlabs/overview/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ftlabs/overview/statuses/{sha}","languages_url":"https://api.github.com/repos/ftlabs/overview/languages","stargazers_url":"https://api.github.com/repos/ftlabs/overview/stargazers","contributors_url":"https://api.github.com/repos/ftlabs/overview/contributors","subscribers_url":"https://api.github.com/repos/ftlabs/overview/subscribers","subscription_url":"https://api.github.com/repos/ftlabs/overview/subscription","commits_url":"https://api.github.com/repos/ftlabs/overview/commits{/sha}","git_commits_url":"https://api.github.com/repos/ftlabs/overview/git/commits{/sha}","comments_url":"https://api.github.com/repos/ftlabs/overview/comments{/number}","issue_comment_url":"https://api.github.com/repos/ftlabs/overview/issues/comments{/number}","contents_url":"https://api.github.com/repos/ftlabs/overview/contents/{+path}","compare_url":"https://api.github.com/repos/ftlabs/overview/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ftlabs/overview/merges","archive_url":"https://api.github.com/repos/ftlabs/overview/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ftlabs/overview/downloads","issues_url":"https://api.github.com/repos/ftlabs/overview/issues{/number}","pulls_url":"https://api.github.com/repos/ftlabs/overview/pulls{/number}","milestones_url":"https://api.github.com/repos/ftlabs/overview/milestones{/number}","notifications_url":"https://api.github.com/repos/ftlabs/overview/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ftlabs/overview/labels{/name}","releases_url":"https://api.github.com/repos/ftlabs/overview/releases{/id}","deployments_url":"https://api.github.com/repos/ftlabs/overview/deployments","created_at":"2018-08-07T11:02:52Z","updated_at":"2018-11-06T15:53:40Z","pushed_at":"2018-11-09T09:17:14Z","git_url":"git://github.com/ftlabs/overview.git","ssh_url":"git@github.com:ftlabs/overview.git","clone_url":"https://github.com/ftlabs/overview.git","svn_url":"https://github.com/ftlabs/overview","homepage":null,"size":764,"stargazers_count":2,"watchers_count":2,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/31"},"html":{"href":"https://github.com/ftlabs/overview/pull/31"},"issue":{"href":"https://api.github.com/repos/ftlabs/overview/issues/31"},"comments":{"href":"https://api.github.com/repos/ftlabs/overview/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ftlabs/overview/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/ftlabs/overview/statuses/7fc19883b946d5126369585f44403a51419d0f91"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Lily2point0"}}