{"action":"created","comment":{"url":"https://api.github.com/repos/18F/team_api/pulls/comments/39567052","id":39567052,"diff_hunk":"@@ -140,10 +141,20 @@ def self.create_xref_data(site)\n     private_class_method :create_xref_data\n \n     def self.xref_tags_and_team_members(site, tag_categories, team_xref)\n+      team = (site.data['team'] || {})\n       tag_categories.each do |category|\n-        xrefs = create_tag_xrefs(site, (site.data['team'] || {}).values,\n-          category, team_xref)\n-        site.data[category] = xrefs unless xrefs.empty?\n+        xrefs = create_tag_xrefs(site, team.values, category, team_xref)\n+        next if xrefs.empty?","path":"lib/team_api/cross_referencer.rb","position":18,"original_position":18,"commit_id":"3b2dc14f6d7080e38a6d1f9360cb1a436dbb8c94","original_commit_id":"3b2dc14f6d7080e38a6d1f9360cb1a436dbb8c94","user":{"login":"mbland","id":301547,"avatar_url":"https://avatars.githubusercontent.com/u/301547?v=3","gravatar_id":"","url":"https://api.github.com/users/mbland","html_url":"https://github.com/mbland","followers_url":"https://api.github.com/users/mbland/followers","following_url":"https://api.github.com/users/mbland/following{/other_user}","gists_url":"https://api.github.com/users/mbland/gists{/gist_id}","starred_url":"https://api.github.com/users/mbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbland/subscriptions","organizations_url":"https://api.github.com/users/mbland/orgs","repos_url":"https://api.github.com/users/mbland/repos","events_url":"https://api.github.com/users/mbland/events{/privacy}","received_events_url":"https://api.github.com/users/mbland/received_events","type":"User","site_admin":false},"body":"I prefer the `next if xrefs.empty?` idiom.","created_at":"2015-09-15T21:21:03Z","updated_at":"2015-09-15T21:21:03Z","html_url":"https://github.com/18F/team_api/pull/7#discussion_r39567052","pull_request_url":"https://api.github.com/repos/18F/team_api/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/18F/team_api/pulls/comments/39567052"},"html":{"href":"https://github.com/18F/team_api/pull/7#discussion_r39567052"},"pull_request":{"href":"https://api.github.com/repos/18F/team_api/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/18F/team_api/pulls/7","id":45098855,"html_url":"https://github.com/18F/team_api/pull/7","diff_url":"https://github.com/18F/team_api/pull/7.diff","patch_url":"https://github.com/18F/team_api/pull/7.patch","issue_url":"https://api.github.com/repos/18F/team_api/issues/7","number":7,"state":"open","locked":false,"title":"Flesh out skills, interests cross-refs for team members","user":{"login":"mbland","id":301547,"avatar_url":"https://avatars.githubusercontent.com/u/301547?v=3","gravatar_id":"","url":"https://api.github.com/users/mbland","html_url":"https://github.com/mbland","followers_url":"https://api.github.com/users/mbland/followers","following_url":"https://api.github.com/users/mbland/following{/other_user}","gists_url":"https://api.github.com/users/mbland/gists{/gist_id}","starred_url":"https://api.github.com/users/mbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbland/subscriptions","organizations_url":"https://api.github.com/users/mbland/orgs","repos_url":"https://api.github.com/users/mbland/repos","events_url":"https://api.github.com/users/mbland/events{/privacy}","received_events_url":"https://api.github.com/users/mbland/received_events","type":"User","site_admin":false},"body":"This is a two part process:\r\n\r\n- First, in `replace_item_tags_with_xrefs` from `cross_referencer.rb`, the list of tags for each team member are converted from strings to hashes containing the cross-reference information for each tag (`name`, `slug`, and `self`).\r\n- Then, in `canonicalize_tags_for_item` from `canonicalizer.rb`, once the master list of tags have been consolidated (e.g. in `site.data['skills']` \"ruby\" and \"Ruby\" are merged into a single \"Ruby\" item), then the cross-references in each team member are updated to use the consolidated name (e.g. \"Ruby\") and then sorted based on that name.\r\n\r\ncc: @arowla @monfresh @jessieay ","created_at":"2015-09-15T20:35:11Z","updated_at":"2015-09-15T21:21:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e242170ed15c20965ec78c6db635fddb20df06f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/team_api/pulls/7/commits","review_comments_url":"https://api.github.com/repos/18F/team_api/pulls/7/comments","review_comment_url":"https://api.github.com/repos/18F/team_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/team_api/issues/7/comments","statuses_url":"https://api.github.com/repos/18F/team_api/statuses/3b2dc14f6d7080e38a6d1f9360cb1a436dbb8c94","head":{"label":"18F:tags-xrefs","ref":"tags-xrefs","sha":"3b2dc14f6d7080e38a6d1f9360cb1a436dbb8c94","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":41646393,"name":"team_api","full_name":"18F/team_api","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/team_api","description":"A gem for compiling information about team members, projects, etc. and exposing it via a JSON API.","fork":false,"url":"https://api.github.com/repos/18F/team_api","forks_url":"https://api.github.com/repos/18F/team_api/forks","keys_url":"https://api.github.com/repos/18F/team_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/team_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/team_api/teams","hooks_url":"https://api.github.com/repos/18F/team_api/hooks","issue_events_url":"https://api.github.com/repos/18F/team_api/issues/events{/number}","events_url":"https://api.github.com/repos/18F/team_api/events","assignees_url":"https://api.github.com/repos/18F/team_api/assignees{/user}","branches_url":"https://api.github.com/repos/18F/team_api/branches{/branch}","tags_url":"https://api.github.com/repos/18F/team_api/tags","blobs_url":"https://api.github.com/repos/18F/team_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/team_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/team_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/team_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/team_api/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/team_api/languages","stargazers_url":"https://api.github.com/repos/18F/team_api/stargazers","contributors_url":"https://api.github.com/repos/18F/team_api/contributors","subscribers_url":"https://api.github.com/repos/18F/team_api/subscribers","subscription_url":"https://api.github.com/repos/18F/team_api/subscription","commits_url":"https://api.github.com/repos/18F/team_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/team_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/team_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/team_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/team_api/contents/{+path}","compare_url":"https://api.github.com/repos/18F/team_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/team_api/merges","archive_url":"https://api.github.com/repos/18F/team_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/team_api/downloads","issues_url":"https://api.github.com/repos/18F/team_api/issues{/number}","pulls_url":"https://api.github.com/repos/18F/team_api/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/team_api/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/team_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/team_api/labels{/name}","releases_url":"https://api.github.com/repos/18F/team_api/releases{/id}","created_at":"2015-08-30T23:27:34Z","updated_at":"2015-08-30T23:48:58Z","pushed_at":"2015-09-15T21:14:22Z","git_url":"git://github.com/18F/team_api.git","ssh_url":"git@github.com:18F/team_api.git","clone_url":"https://github.com/18F/team_api.git","svn_url":"https://github.com/18F/team_api","homepage":"https://rubygems.org/gems/team_api","size":212,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"d9c0eee7d7aa6a6653308e7e4b8a8b1575cde302","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":41646393,"name":"team_api","full_name":"18F/team_api","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/team_api","description":"A gem for compiling information about team members, projects, etc. and exposing it via a JSON API.","fork":false,"url":"https://api.github.com/repos/18F/team_api","forks_url":"https://api.github.com/repos/18F/team_api/forks","keys_url":"https://api.github.com/repos/18F/team_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/team_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/team_api/teams","hooks_url":"https://api.github.com/repos/18F/team_api/hooks","issue_events_url":"https://api.github.com/repos/18F/team_api/issues/events{/number}","events_url":"https://api.github.com/repos/18F/team_api/events","assignees_url":"https://api.github.com/repos/18F/team_api/assignees{/user}","branches_url":"https://api.github.com/repos/18F/team_api/branches{/branch}","tags_url":"https://api.github.com/repos/18F/team_api/tags","blobs_url":"https://api.github.com/repos/18F/team_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/team_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/team_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/team_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/team_api/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/team_api/languages","stargazers_url":"https://api.github.com/repos/18F/team_api/stargazers","contributors_url":"https://api.github.com/repos/18F/team_api/contributors","subscribers_url":"https://api.github.com/repos/18F/team_api/subscribers","subscription_url":"https://api.github.com/repos/18F/team_api/subscription","commits_url":"https://api.github.com/repos/18F/team_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/team_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/team_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/team_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/team_api/contents/{+path}","compare_url":"https://api.github.com/repos/18F/team_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/team_api/merges","archive_url":"https://api.github.com/repos/18F/team_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/team_api/downloads","issues_url":"https://api.github.com/repos/18F/team_api/issues{/number}","pulls_url":"https://api.github.com/repos/18F/team_api/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/team_api/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/team_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/team_api/labels{/name}","releases_url":"https://api.github.com/repos/18F/team_api/releases{/id}","created_at":"2015-08-30T23:27:34Z","updated_at":"2015-08-30T23:48:58Z","pushed_at":"2015-09-15T21:14:22Z","git_url":"git://github.com/18F/team_api.git","ssh_url":"git@github.com:18F/team_api.git","clone_url":"https://github.com/18F/team_api.git","svn_url":"https://github.com/18F/team_api","homepage":"https://rubygems.org/gems/team_api","size":212,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/team_api/pulls/7"},"html":{"href":"https://github.com/18F/team_api/pull/7"},"issue":{"href":"https://api.github.com/repos/18F/team_api/issues/7"},"comments":{"href":"https://api.github.com/repos/18F/team_api/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/team_api/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/team_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/team_api/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/18F/team_api/statuses/3b2dc14f6d7080e38a6d1f9360cb1a436dbb8c94"}}}}