{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62732977","id":62732977,"diff_hunk":"@@ -102,13 +93,58 @@ class ReportGenerator {\n     return '<script src=\"/pages/scripts/lighthouse-report.js\"></script>';\n   }\n \n+  _createSections(aggregations) {\n+    return aggregations.reduce((menu, aggregation) => {\n+      if (menu.indexOf(aggregation.type.name) === -1) {\n+        menu.push(aggregation.type.name);\n+      }\n+      return menu;\n+    }, []);\n+  }\n+\n+  _createPWAAuditsByTag(aggregations) {\n+    const items = {};\n+\n+    aggregations.forEach(aggregation => {\n+      // We only regroup the PWA aggregations around so ignore\n+      if (aggregation.type.name !== Aggregate.VALID_TYPES.PWA.name) {\n+        return;\n+      }\n+\n+      aggregation.score.subItems.forEach(subItem => {\n+        // Create a space for the tag.\n+        if (!items[subItem.tag]) {\n+          items[subItem.tag] = {};\n+        }\n+\n+        // Then use the name to de-dupe the same audit from different aggregations.\n+        if (!items[subItem.tag][subItem.name]) {\n+          items[subItem.tag][subItem.name] = subItem;\n+        }\n+      });\n+    });\n+\n+    return items;\n+  }\n+\n   generateHTML(results, options) {\n     const inline = (options && options.inline) || false;\n+    const totalAggregations = results.aggregations.reduce((total, aggregation) => {\n+      if (!aggregation.type.contributesToScore) {","path":"report/report-generator.js","position":89,"original_position":89,"commit_id":"dc91aa990b23c9915de6b5f0187450637b7b6c57","original_commit_id":"dc91aa990b23c9915de6b5f0187450637b7b6c57","user":{"login":"brendankenny","id":316891,"avatar_url":"https://avatars.githubusercontent.com/u/316891?v=3","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"body":"we might have to refactor where aggregation scoring takes place","created_at":"2016-05-10T19:08:07Z","updated_at":"2016-05-10T19:08:07Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/312#discussion_r62732977","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/62732977"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/312#discussion_r62732977"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312","id":69511938,"html_url":"https://github.com/GoogleChrome/lighthouse/pull/312","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/312.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/312.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/312","number":312,"state":"open","locked":false,"title":"Report refactor","user":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-10T14:05:13Z","updated_at":"2016-05-10T19:08:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"262beccbd955cba2e21c1cb7f826f6816531b070","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/312/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/dc91aa990b23c9915de6b5f0187450637b7b6c57","head":{"label":"paullewis:report-refactor","ref":"report-refactor","sha":"dc91aa990b23c9915de6b5f0187450637b7b6c57","user":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"repo":{"id":54384726,"name":"lighthouse","full_name":"paullewis/lighthouse","owner":{"login":"paullewis","id":617438,"avatar_url":"https://avatars.githubusercontent.com/u/617438?v=3","gravatar_id":"","url":"https://api.github.com/users/paullewis","html_url":"https://github.com/paullewis","followers_url":"https://api.github.com/users/paullewis/followers","following_url":"https://api.github.com/users/paullewis/following{/other_user}","gists_url":"https://api.github.com/users/paullewis/gists{/gist_id}","starred_url":"https://api.github.com/users/paullewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paullewis/subscriptions","organizations_url":"https://api.github.com/users/paullewis/orgs","repos_url":"https://api.github.com/users/paullewis/repos","events_url":"https://api.github.com/users/paullewis/events{/privacy}","received_events_url":"https://api.github.com/users/paullewis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paullewis/lighthouse","description":null,"fork":true,"url":"https://api.github.com/repos/paullewis/lighthouse","forks_url":"https://api.github.com/repos/paullewis/lighthouse/forks","keys_url":"https://api.github.com/repos/paullewis/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paullewis/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paullewis/lighthouse/teams","hooks_url":"https://api.github.com/repos/paullewis/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/paullewis/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/paullewis/lighthouse/events","assignees_url":"https://api.github.com/repos/paullewis/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/paullewis/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/paullewis/lighthouse/tags","blobs_url":"https://api.github.com/repos/paullewis/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paullewis/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paullewis/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/paullewis/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paullewis/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/paullewis/lighthouse/languages","stargazers_url":"https://api.github.com/repos/paullewis/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/paullewis/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/paullewis/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/paullewis/lighthouse/subscription","commits_url":"https://api.github.com/repos/paullewis/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/paullewis/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/paullewis/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/paullewis/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/paullewis/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/paullewis/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paullewis/lighthouse/merges","archive_url":"https://api.github.com/repos/paullewis/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paullewis/lighthouse/downloads","issues_url":"https://api.github.com/repos/paullewis/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/paullewis/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/paullewis/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/paullewis/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paullewis/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/paullewis/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/paullewis/lighthouse/deployments","created_at":"2016-03-21T11:54:00Z","updated_at":"2016-03-21T11:54:01Z","pushed_at":"2016-05-10T14:38:27Z","git_url":"git://github.com/paullewis/lighthouse.git","ssh_url":"git@github.com:paullewis/lighthouse.git","clone_url":"https://github.com/paullewis/lighthouse.git","svn_url":"https://github.com/paullewis/lighthouse","homepage":null,"size":6009,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"1a7c69a6716c05638ff5b68edad25c13a5fd45b9","user":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"avatar_url":"https://avatars.githubusercontent.com/u/1778935?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":null,"fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2016-05-07T07:18:30Z","pushed_at":"2016-05-10T18:47:56Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":null,"size":6004,"stargazers_count":90,"watchers_count":90,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":38,"forks":16,"open_issues":38,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/312"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/312"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/312/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/312/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/dc91aa990b23c9915de6b5f0187450637b7b6c57"}}}}