{"action":"created","comment":{"url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments/125837569","pull_request_review_id":48263788,"id":125837569,"diff_hunk":"@@ -0,0 +1,139 @@\n+import _ from 'underscore';\n+\n+import template from './activities.html';\n+import './activities.scss';\n+\n+function ActivitiesController($scope, dimStoreService, dimDefinitions, dimSettingsService) {\n+  'ngInject';\n+\n+  const vm = this;\n+\n+  vm.settings = dimSettingsService;\n+\n+  // TODO: it's time for a directive\n+  vm.toggleSection = function(id) {\n+    vm.settings.collapsedSections[id] = !vm.settings.collapsedSections[id];\n+    vm.settings.save();\n+  };\n+\n+  vm.settingsChanged = function() {\n+    vm.settings.save();\n+  };\n+\n+  // TODO: Ideally there would be an Advisors service that would\n+  // lazily load advisor info, and we'd get that info\n+  // here. Unfortunately we're also using advisor info to populate\n+  // extra info in Trials cards in Store service, and it's more\n+  // efficient to just fish the info out of there.\n+\n+  // TODO: it'll be nice to replace this pattern with RxJS observables\n+  function init(stores = dimStoreService.getStores()) {\n+    if (_.isEmpty(stores)) {\n+      return;\n+    }\n+\n+    stores = stores.filter((s) => s.id !== 'vault');\n+\n+    const whitelist = [\n+      'vaultofglass',\n+      'crota',\n+      'kingsfall',\n+      'wrathofthemachine',\n+      //      'elderchallenge',\n+      'nightfall',\n+      'heroicstrike',\n+    ];\n+\n+    dimDefinitions.getDefinitions().then((defs) => {\n+      const rawActivities = stores[0].advisors.activities;\n+      vm.activities = _.chain(rawActivities)\n+        .filter('activityTiers') // exclude trials, iron banner, armsday, xur\n+        .filter((a) => {\n+          return whitelist.includes(a.identifier);\n+        })\n+        .sortBy((a) => {\n+          const ix = whitelist.indexOf(a.identifier);\n+          return (ix === -1) ? 999 : ix;\n+          //          return -a.display.categoryHash;\n+        })\n+        .map((a) => processActivities(defs, stores, a))\n+        .value();\n+\n+      vm.activities.forEach((a) => {\n+        a.tiers.forEach((t) => {\n+          if (t.hash === stores[0].advisors.activities.weeklyfeaturedraid.display.activityHash) {\n+            a.featured = true;\n+          }\n+        });\n+      });\n+    });\n+  }\n+\n+  init();\n+\n+  $scope.$on('dim-stores-updated', (e, args) => {\n+    init(args.stores);\n+  });\n+\n+  function processActivities(defs, stores, rawActivity) {\n+    const activityDef = defs.Activity[rawActivity.display.activityHash];\n+\n+    const activity = {\n+      hash: rawActivity.display.activityHash,\n+      name: rawActivity.display.advisorTypeCategory,\n+      icon: rawActivity.display.icon,\n+      image: rawActivity.display.image,\n+      description: activityDef.activityDescription,\n+    };\n+\n+    if (rawActivity.extended) {\n+      activity.skulls = rawActivity.extended.skullCategories.map((s) => {\n+        return s.skulls;\n+      }).reduce((a, b) => {\n+        return a.concat(b);\n+      });\n+    }\n+\n+    if (rawActivity.activityTiers[0].skullCategories && rawActivity.activityTiers[0].skullCategories.length) {\n+      activity.skulls = rawActivity.activityTiers[0].skullCategories[0].skulls;\n+    }\n+\n+    activity.tiers = rawActivity.activityTiers.map((r, i) => processActivity(defs, rawActivity.identifier, stores, r, i));\n+\n+    return activity;\n+  }\n+\n+  function processActivity(defs, activityId, stores, tier, index) {\n+    const tierDef = defs.Activity[tier.activityHash];\n+\n+    const name = tier.activityData.recommendedLight === 390 ? 390\n+      : (tier.tierDisplayName ? tier.tierDisplayName : tierDef.activityName);\n+\n+    const characters = activityId !== 'heroicstrike' ? stores.map((store) => {","path":"src/scripts/activities/activities.component.js","position":112,"original_position":112,"commit_id":"9a94a93b5df5c986498b135401674a6ee8c31cec","original_commit_id":"9a94a93b5df5c986498b135401674a6ee8c31cec","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Unexpected negated condition  no-negated-condition","created_at":"2017-07-06T08:19:22Z","updated_at":"2017-07-06T08:19:22Z","html_url":"https://github.com/DestinyItemManager/DIM/pull/1886#discussion_r125837569","pull_request_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886","_links":{"self":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments/125837569"},"html":{"href":"https://github.com/DestinyItemManager/DIM/pull/1886#discussion_r125837569"},"pull_request":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886"}}},"pull_request":{"url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886","id":129109021,"html_url":"https://github.com/DestinyItemManager/DIM/pull/1886","diff_url":"https://github.com/DestinyItemManager/DIM/pull/1886.diff","patch_url":"https://github.com/DestinyItemManager/DIM/pull/1886.patch","issue_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/1886","number":1886,"state":"open","locked":false,"title":"Activities tab","user":{"login":"kyleshay","id":424158,"avatar_url":"https://avatars0.githubusercontent.com/u/424158?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleshay","html_url":"https://github.com/kyleshay","followers_url":"https://api.github.com/users/kyleshay/followers","following_url":"https://api.github.com/users/kyleshay/following{/other_user}","gists_url":"https://api.github.com/users/kyleshay/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleshay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleshay/subscriptions","organizations_url":"https://api.github.com/users/kyleshay/orgs","repos_url":"https://api.github.com/users/kyleshay/repos","events_url":"https://api.github.com/users/kyleshay/events{/privacy}","received_events_url":"https://api.github.com/users/kyleshay/received_events","type":"User","site_admin":false},"body":"Figured we should get this into DIM as seeing these things within the same app might be useful for D2.\r\n\r\nI’m intentionally hiding some activities (by using a whitelist, because is it really that important to know what the weekly crucible type is? you can just see it in game. weekly strike/nightfall is nice because then you can setup your loadout based on the burn.) I can add more in, but for the first phase this is what is shown.\r\n\r\n<img width=\"1444\" alt=\"screen shot 2017-07-05 at 10 55 23 pm\" src=\"https://user-images.githubusercontent.com/424158/27897665-698fd7ae-61d6-11e7-93e3-38d437901fdd.png\">\r\n\r\ntodo: \r\n\r\n- [x] nightfall still needs a checkbox\r\n- [x] weekly heroic doesn't need to show each of the characters, just the modifiers.\r\n- [ ] weekly heroic should show number of weekly bonuses remaining\r\n\r\nThis fixes #145","created_at":"2017-07-06T06:01:54Z","updated_at":"2017-07-06T08:19:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f73dcac97f4f7ee81b94ea60f61351481e48595","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886/commits","review_comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886/comments","review_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/1886/comments","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/9a94a93b5df5c986498b135401674a6ee8c31cec","head":{"label":"DestinyItemManager:activities","ref":"activities","sha":"9a94a93b5df5c986498b135401674a6ee8c31cec","user":{"login":"DestinyItemManager","id":12777189,"avatar_url":"https://avatars0.githubusercontent.com/u/12777189?v=3","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"repo":{"id":31681575,"name":"DIM","full_name":"DestinyItemManager/DIM","owner":{"login":"DestinyItemManager","id":12777189,"avatar_url":"https://avatars0.githubusercontent.com/u/12777189?v=3","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DestinyItemManager/DIM","description":"Destiny Item Manager","fork":false,"url":"https://api.github.com/repos/DestinyItemManager/DIM","forks_url":"https://api.github.com/repos/DestinyItemManager/DIM/forks","keys_url":"https://api.github.com/repos/DestinyItemManager/DIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DestinyItemManager/DIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DestinyItemManager/DIM/teams","hooks_url":"https://api.github.com/repos/DestinyItemManager/DIM/hooks","issue_events_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/events{/number}","events_url":"https://api.github.com/repos/DestinyItemManager/DIM/events","assignees_url":"https://api.github.com/repos/DestinyItemManager/DIM/assignees{/user}","branches_url":"https://api.github.com/repos/DestinyItemManager/DIM/branches{/branch}","tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/tags","blobs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/{sha}","languages_url":"https://api.github.com/repos/DestinyItemManager/DIM/languages","stargazers_url":"https://api.github.com/repos/DestinyItemManager/DIM/stargazers","contributors_url":"https://api.github.com/repos/DestinyItemManager/DIM/contributors","subscribers_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscribers","subscription_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscription","commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/DestinyItemManager/DIM/contents/{+path}","compare_url":"https://api.github.com/repos/DestinyItemManager/DIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DestinyItemManager/DIM/merges","archive_url":"https://api.github.com/repos/DestinyItemManager/DIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DestinyItemManager/DIM/downloads","issues_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues{/number}","pulls_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls{/number}","milestones_url":"https://api.github.com/repos/DestinyItemManager/DIM/milestones{/number}","notifications_url":"https://api.github.com/repos/DestinyItemManager/DIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DestinyItemManager/DIM/labels{/name}","releases_url":"https://api.github.com/repos/DestinyItemManager/DIM/releases{/id}","deployments_url":"https://api.github.com/repos/DestinyItemManager/DIM/deployments","created_at":"2015-03-04T21:46:50Z","updated_at":"2017-07-05T20:24:18Z","pushed_at":"2017-07-06T08:19:12Z","git_url":"git://github.com/DestinyItemManager/DIM.git","ssh_url":"git@github.com:DestinyItemManager/DIM.git","clone_url":"https://github.com/DestinyItemManager/DIM.git","svn_url":"https://github.com/DestinyItemManager/DIM","homepage":"https://destinyitemmanager.com","size":249663,"stargazers_count":447,"watchers_count":447,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":84,"forks":195,"open_issues":84,"watchers":447,"default_branch":"master"}},"base":{"label":"DestinyItemManager:master","ref":"master","sha":"48f3c2aad309432a2803c90fc8c2004830597bca","user":{"login":"DestinyItemManager","id":12777189,"avatar_url":"https://avatars0.githubusercontent.com/u/12777189?v=3","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"repo":{"id":31681575,"name":"DIM","full_name":"DestinyItemManager/DIM","owner":{"login":"DestinyItemManager","id":12777189,"avatar_url":"https://avatars0.githubusercontent.com/u/12777189?v=3","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DestinyItemManager/DIM","description":"Destiny Item Manager","fork":false,"url":"https://api.github.com/repos/DestinyItemManager/DIM","forks_url":"https://api.github.com/repos/DestinyItemManager/DIM/forks","keys_url":"https://api.github.com/repos/DestinyItemManager/DIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DestinyItemManager/DIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DestinyItemManager/DIM/teams","hooks_url":"https://api.github.com/repos/DestinyItemManager/DIM/hooks","issue_events_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/events{/number}","events_url":"https://api.github.com/repos/DestinyItemManager/DIM/events","assignees_url":"https://api.github.com/repos/DestinyItemManager/DIM/assignees{/user}","branches_url":"https://api.github.com/repos/DestinyItemManager/DIM/branches{/branch}","tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/tags","blobs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/{sha}","languages_url":"https://api.github.com/repos/DestinyItemManager/DIM/languages","stargazers_url":"https://api.github.com/repos/DestinyItemManager/DIM/stargazers","contributors_url":"https://api.github.com/repos/DestinyItemManager/DIM/contributors","subscribers_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscribers","subscription_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscription","commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/DestinyItemManager/DIM/contents/{+path}","compare_url":"https://api.github.com/repos/DestinyItemManager/DIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DestinyItemManager/DIM/merges","archive_url":"https://api.github.com/repos/DestinyItemManager/DIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DestinyItemManager/DIM/downloads","issues_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues{/number}","pulls_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls{/number}","milestones_url":"https://api.github.com/repos/DestinyItemManager/DIM/milestones{/number}","notifications_url":"https://api.github.com/repos/DestinyItemManager/DIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DestinyItemManager/DIM/labels{/name}","releases_url":"https://api.github.com/repos/DestinyItemManager/DIM/releases{/id}","deployments_url":"https://api.github.com/repos/DestinyItemManager/DIM/deployments","created_at":"2015-03-04T21:46:50Z","updated_at":"2017-07-05T20:24:18Z","pushed_at":"2017-07-06T08:19:12Z","git_url":"git://github.com/DestinyItemManager/DIM.git","ssh_url":"git@github.com:DestinyItemManager/DIM.git","clone_url":"https://github.com/DestinyItemManager/DIM.git","svn_url":"https://github.com/DestinyItemManager/DIM","homepage":"https://destinyitemmanager.com","size":249663,"stargazers_count":447,"watchers_count":447,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":195,"mirror_url":null,"open_issues_count":84,"forks":195,"open_issues":84,"watchers":447,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886"},"html":{"href":"https://github.com/DestinyItemManager/DIM/pull/1886"},"issue":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/issues/1886"},"comments":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/issues/1886/comments"},"review_comments":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886/comments"},"review_comment":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/1886/commits"},"statuses":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/9a94a93b5df5c986498b135401674a6ee8c31cec"}}}}
{"actor":{"display_login":"houndci-bot"}}