{"action":"created","comment":{"url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/comments/84400114","pull_request_review_id":5181716,"id":84400114,"diff_hunk":"@@ -278,6 +279,30 @@ def app_js\n       read_file('app.js')\n     end\n \n+    def location_icons\n+      {}.tap do |location_icons|\n+        manifest.locations.each do |host, locations_for_host|\n+          next unless [Product::SUPPORT.name].include?(host)\n+\n+          locations_for_host.keys.each do |location|\n+            next unless ['top_bar', 'nav_bar'].include?(location)\n+            location_icons[host] ||= {}\n+            location_icons[host][location] = if (has_file?(\"assets/icon_#{location}.svg\"))\n+              { 'svg' => \"icon_#{location}.svg\" }\n+            elsif (has_file?(\"assets/icon_#{location}_inactive.png\"))\n+              {\n+                'inactive' => \"icon_#{location}_inactive.png\",","path":"lib/zendesk_apps_support/package.rb","position":33,"original_position":24,"commit_id":"ca3b8de1fc2456b5d90e4456d86885103ed652db","original_commit_id":"a65e99c488b113ae6a09b2b8b0ac88dbb0df2b3a","user":{"login":"svizzari","id":1216974,"avatar_url":"https://avatars.githubusercontent.com/u/1216974?v=3","gravatar_id":"","url":"https://api.github.com/users/svizzari","html_url":"https://github.com/svizzari","followers_url":"https://api.github.com/users/svizzari/followers","following_url":"https://api.github.com/users/svizzari/following{/other_user}","gists_url":"https://api.github.com/users/svizzari/gists{/gist_id}","starred_url":"https://api.github.com/users/svizzari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svizzari/subscriptions","organizations_url":"https://api.github.com/users/svizzari/orgs","repos_url":"https://api.github.com/users/svizzari/repos","events_url":"https://api.github.com/users/svizzari/events{/privacy}","received_events_url":"https://api.github.com/users/svizzari/received_events","type":"User","site_admin":false},"body":"This line and the two below are very similar, the only variation is the state name and they all fall back to inactive.  Couldn't you store the states in an array, iterate over them and replace the state name part?","created_at":"2016-10-21T00:10:52Z","updated_at":"2016-10-21T00:10:52Z","html_url":"https://github.com/zendesk/zendesk_apps_support/pull/133#discussion_r84400114","pull_request_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/comments/84400114"},"html":{"href":"https://github.com/zendesk/zendesk_apps_support/pull/133#discussion_r84400114"},"pull_request":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133","id":86677158,"html_url":"https://github.com/zendesk/zendesk_apps_support/pull/133","diff_url":"https://github.com/zendesk/zendesk_apps_support/pull/133.diff","patch_url":"https://github.com/zendesk/zendesk_apps_support/pull/133.patch","issue_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/133","number":133,"state":"closed","locked":false,"title":"Add icons to src.js so we don't have to guess in lotus!","user":{"login":"ocke","id":5171412,"avatar_url":"https://avatars.githubusercontent.com/u/5171412?v=3","gravatar_id":"","url":"https://api.github.com/users/ocke","html_url":"https://github.com/ocke","followers_url":"https://api.github.com/users/ocke/followers","following_url":"https://api.github.com/users/ocke/following{/other_user}","gists_url":"https://api.github.com/users/ocke/gists{/gist_id}","starred_url":"https://api.github.com/users/ocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocke/subscriptions","organizations_url":"https://api.github.com/users/ocke/orgs","repos_url":"https://api.github.com/users/ocke/repos","events_url":"https://api.github.com/users/ocke/events{/privacy}","received_events_url":"https://api.github.com/users/ocke/received_events","type":"User","site_admin":false},"body":":v:\r\n\r\n/cc @zendesk/vegemite\r\n\r\n### Description\r\nWe supply icons from ZAS now, so host products don't have to guess and have them hardcoded!\r\nAlso, way more flexible.\r\n\r\n### References\r\n* JIRA: \r\n\r\n### Risks","created_at":"2016-09-26T03:34:30Z","updated_at":"2016-10-21T00:10:52Z","closed_at":"2016-10-20T05:53:58Z","merged_at":"2016-10-20T05:53:58Z","merge_commit_sha":"39e81ec9e744f4319f21f45da1bfa604ba5468ba","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133/commits","review_comments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133/comments","review_comment_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/133/comments","statuses_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/statuses/ca3b8de1fc2456b5d90e4456d86885103ed652db","head":{"label":"zendesk:olaf/icons","ref":"olaf/icons","sha":"ca3b8de1fc2456b5d90e4456d86885103ed652db","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":6622163,"name":"zendesk_apps_support","full_name":"zendesk/zendesk_apps_support","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/zendesk_apps_support","description":null,"fork":false,"url":"https://api.github.com/repos/zendesk/zendesk_apps_support","forks_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/forks","keys_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/teams","hooks_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/hooks","issue_events_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/events","assignees_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/tags","blobs_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/languages","stargazers_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/stargazers","contributors_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/contributors","subscribers_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/subscribers","subscription_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/subscription","commits_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/merges","archive_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/downloads","issues_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/deployments","created_at":"2012-11-09T23:29:16Z","updated_at":"2016-07-27T21:39:56Z","pushed_at":"2016-10-20T05:54:00Z","git_url":"git://github.com/zendesk/zendesk_apps_support.git","ssh_url":"git@github.com:zendesk/zendesk_apps_support.git","clone_url":"https://github.com/zendesk/zendesk_apps_support.git","svn_url":"https://github.com/zendesk/zendesk_apps_support","homepage":null,"size":998,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"zendesk:master","ref":"master","sha":"9ff4cdc44842c76b56f63c48a8eb08c4a2accc93","user":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"repo":{"id":6622163,"name":"zendesk_apps_support","full_name":"zendesk/zendesk_apps_support","owner":{"login":"zendesk","id":11525,"avatar_url":"https://avatars.githubusercontent.com/u/11525?v=3","gravatar_id":"","url":"https://api.github.com/users/zendesk","html_url":"https://github.com/zendesk","followers_url":"https://api.github.com/users/zendesk/followers","following_url":"https://api.github.com/users/zendesk/following{/other_user}","gists_url":"https://api.github.com/users/zendesk/gists{/gist_id}","starred_url":"https://api.github.com/users/zendesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendesk/subscriptions","organizations_url":"https://api.github.com/users/zendesk/orgs","repos_url":"https://api.github.com/users/zendesk/repos","events_url":"https://api.github.com/users/zendesk/events{/privacy}","received_events_url":"https://api.github.com/users/zendesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendesk/zendesk_apps_support","description":null,"fork":false,"url":"https://api.github.com/repos/zendesk/zendesk_apps_support","forks_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/forks","keys_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/teams","hooks_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/hooks","issue_events_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/events{/number}","events_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/events","assignees_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/assignees{/user}","branches_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/branches{/branch}","tags_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/tags","blobs_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/statuses/{sha}","languages_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/languages","stargazers_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/stargazers","contributors_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/contributors","subscribers_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/subscribers","subscription_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/subscription","commits_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/contents/{+path}","compare_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/merges","archive_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/downloads","issues_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues{/number}","pulls_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls{/number}","milestones_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/milestones{/number}","notifications_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/labels{/name}","releases_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/releases{/id}","deployments_url":"https://api.github.com/repos/zendesk/zendesk_apps_support/deployments","created_at":"2012-11-09T23:29:16Z","updated_at":"2016-07-27T21:39:56Z","pushed_at":"2016-10-20T05:54:00Z","git_url":"git://github.com/zendesk/zendesk_apps_support.git","ssh_url":"git@github.com:zendesk/zendesk_apps_support.git","clone_url":"https://github.com/zendesk/zendesk_apps_support.git","svn_url":"https://github.com/zendesk/zendesk_apps_support","homepage":null,"size":998,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133"},"html":{"href":"https://github.com/zendesk/zendesk_apps_support/pull/133"},"issue":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/133"},"comments":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/zendesk/zendesk_apps_support/statuses/ca3b8de1fc2456b5d90e4456d86885103ed652db"}}}}
{"actor":{"display_login":"svizzari"}}