{"action":"created","comment":{"url":"https://api.github.com/repos/18F/dashboard/pulls/comments/46068210","id":46068210,"diff_hunk":"@@ -43,6 +43,13 @@ def self.munge_project_data(project_data)\n       FIELDS_TO_TRANSLATE.each do |from, to|\n         project_data[to] = project_data[from] unless project_data[to]\n       end\n+      original_name = project_data['name']\n+      if original_name.scan(/[A-Z]/).size > 0\n+        project_data['redirect_from'] = Array.new\n+        project_data['redirect_from'].push(\"project/#{original_name}\")","path":"_plugins/dashboard.rb","position":7,"original_position":7,"commit_id":"a6d9ffb517c32fbeb8a6c02e444ed309f4949df9","original_commit_id":"a6d9ffb517c32fbeb8a6c02e444ed309f4949df9","user":{"login":"gboone","id":312468,"avatar_url":"https://avatars.githubusercontent.com/u/312468?v=3","gravatar_id":"","url":"https://api.github.com/users/gboone","html_url":"https://github.com/gboone","followers_url":"https://api.github.com/users/gboone/followers","following_url":"https://api.github.com/users/gboone/following{/other_user}","gists_url":"https://api.github.com/users/gboone/gists{/gist_id}","starred_url":"https://api.github.com/users/gboone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gboone/subscriptions","organizations_url":"https://api.github.com/users/gboone/orgs","repos_url":"https://api.github.com/users/gboone/repos","events_url":"https://api.github.com/users/gboone/events{/privacy}","received_events_url":"https://api.github.com/users/gboone/received_events","type":"User","site_admin":false},"body":"_I_ wouldn't thought to do that because I'm not as good at reading or writing idomatic ruby and don't fully understand that line at a quick glance. But from what I _do_ understand of ruby's idioms that looks good.","created_at":"2015-11-27T19:51:31Z","updated_at":"2015-11-27T19:51:31Z","html_url":"https://github.com/18F/dashboard/pull/300#discussion_r46068210","pull_request_url":"https://api.github.com/repos/18F/dashboard/pulls/300","_links":{"self":{"href":"https://api.github.com/repos/18F/dashboard/pulls/comments/46068210"},"html":{"href":"https://github.com/18F/dashboard/pull/300#discussion_r46068210"},"pull_request":{"href":"https://api.github.com/repos/18F/dashboard/pulls/300"}}},"pull_request":{"url":"https://api.github.com/repos/18F/dashboard/pulls/300","id":52005338,"html_url":"https://github.com/18F/dashboard/pull/300","diff_url":"https://github.com/18F/dashboard/pull/300.diff","patch_url":"https://github.com/18F/dashboard/pull/300.patch","issue_url":"https://api.github.com/repos/18F/dashboard/issues/300","number":300,"state":"open","locked":false,"title":"Redirect to","user":{"login":"gboone","id":312468,"avatar_url":"https://avatars.githubusercontent.com/u/312468?v=3","gravatar_id":"","url":"https://api.github.com/users/gboone","html_url":"https://github.com/gboone","followers_url":"https://api.github.com/users/gboone/followers","following_url":"https://api.github.com/users/gboone/following{/other_user}","gists_url":"https://api.github.com/users/gboone/gists{/gist_id}","starred_url":"https://api.github.com/users/gboone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gboone/subscriptions","organizations_url":"https://api.github.com/users/gboone/orgs","repos_url":"https://api.github.com/users/gboone/repos","events_url":"https://api.github.com/users/gboone/events{/privacy}","received_events_url":"https://api.github.com/users/gboone/received_events","type":"User","site_admin":false},"body":"This pull request adds the [jekyll-redirect-from plugin](https://github.com/jekyll/jekyll-redirect-from) and configures the Dashboard plugin to redirect certain URLs automatically.\r\n\r\nThe Dashboard plugin now lowercases all 'name' values for projects and automatically adds the redirect for the original uppercased string.\r\n\r\nFor example, the project betaFEC has the name `betaFEC`. Before this change that would result in a url `dashboard/project/betaFEC/`. After this change it will result in a url `dashboard/project/betafec` that also\r\nresponds to the named url.\r\n\r\nLowercase urls are a specific rule in the 18F content guide. This commit (714977d) also ensures that URLs listed on the index page are written lower case.\r\n\r\n80c6bcf also adds two redirection pages for the USEITI and FEC projects which changed names in the Team API. (See also 18F/team-api#146)","created_at":"2015-11-27T15:27:18Z","updated_at":"2015-11-27T19:51:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db9371416b61f5bb424a05516c4659391f3cfbc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/dashboard/pulls/300/commits","review_comments_url":"https://api.github.com/repos/18F/dashboard/pulls/300/comments","review_comment_url":"https://api.github.com/repos/18F/dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/dashboard/issues/300/comments","statuses_url":"https://api.github.com/repos/18F/dashboard/statuses/a6d9ffb517c32fbeb8a6c02e444ed309f4949df9","head":{"label":"18F:redirect_to","ref":"redirect_to","sha":"a6d9ffb517c32fbeb8a6c02e444ed309f4949df9","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":23403252,"name":"dashboard","full_name":"18F/dashboard","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/dashboard","description":"A site to track our projects' status and much, much more...","fork":false,"url":"https://api.github.com/repos/18F/dashboard","forks_url":"https://api.github.com/repos/18F/dashboard/forks","keys_url":"https://api.github.com/repos/18F/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/dashboard/teams","hooks_url":"https://api.github.com/repos/18F/dashboard/hooks","issue_events_url":"https://api.github.com/repos/18F/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/18F/dashboard/events","assignees_url":"https://api.github.com/repos/18F/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/18F/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/18F/dashboard/tags","blobs_url":"https://api.github.com/repos/18F/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/dashboard/languages","stargazers_url":"https://api.github.com/repos/18F/dashboard/stargazers","contributors_url":"https://api.github.com/repos/18F/dashboard/contributors","subscribers_url":"https://api.github.com/repos/18F/dashboard/subscribers","subscription_url":"https://api.github.com/repos/18F/dashboard/subscription","commits_url":"https://api.github.com/repos/18F/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/18F/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/dashboard/merges","archive_url":"https://api.github.com/repos/18F/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/dashboard/downloads","issues_url":"https://api.github.com/repos/18F/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/18F/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/18F/dashboard/releases{/id}","created_at":"2014-08-27T19:51:04Z","updated_at":"2015-11-20T13:23:05Z","pushed_at":"2015-11-27T15:27:19Z","git_url":"git://github.com/18F/dashboard.git","ssh_url":"git@github.com:18F/dashboard.git","clone_url":"https://github.com/18F/dashboard.git","svn_url":"https://github.com/18F/dashboard","homepage":"https://18f.gsa.gov/dashboard","size":607,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":47,"forks":13,"open_issues":47,"watchers":32,"default_branch":"staging"}},"base":{"label":"18F:staging","ref":"staging","sha":"a1b4a987a8cfd302e6a95c06947248a73223ed6e","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":23403252,"name":"dashboard","full_name":"18F/dashboard","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/dashboard","description":"A site to track our projects' status and much, much more...","fork":false,"url":"https://api.github.com/repos/18F/dashboard","forks_url":"https://api.github.com/repos/18F/dashboard/forks","keys_url":"https://api.github.com/repos/18F/dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/dashboard/teams","hooks_url":"https://api.github.com/repos/18F/dashboard/hooks","issue_events_url":"https://api.github.com/repos/18F/dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/18F/dashboard/events","assignees_url":"https://api.github.com/repos/18F/dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/18F/dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/18F/dashboard/tags","blobs_url":"https://api.github.com/repos/18F/dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/dashboard/languages","stargazers_url":"https://api.github.com/repos/18F/dashboard/stargazers","contributors_url":"https://api.github.com/repos/18F/dashboard/contributors","subscribers_url":"https://api.github.com/repos/18F/dashboard/subscribers","subscription_url":"https://api.github.com/repos/18F/dashboard/subscription","commits_url":"https://api.github.com/repos/18F/dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/18F/dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/dashboard/merges","archive_url":"https://api.github.com/repos/18F/dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/dashboard/downloads","issues_url":"https://api.github.com/repos/18F/dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/18F/dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/dashboard/labels{/name}","releases_url":"https://api.github.com/repos/18F/dashboard/releases{/id}","created_at":"2014-08-27T19:51:04Z","updated_at":"2015-11-20T13:23:05Z","pushed_at":"2015-11-27T15:27:19Z","git_url":"git://github.com/18F/dashboard.git","ssh_url":"git@github.com:18F/dashboard.git","clone_url":"https://github.com/18F/dashboard.git","svn_url":"https://github.com/18F/dashboard","homepage":"https://18f.gsa.gov/dashboard","size":607,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":47,"forks":13,"open_issues":47,"watchers":32,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/dashboard/pulls/300"},"html":{"href":"https://github.com/18F/dashboard/pull/300"},"issue":{"href":"https://api.github.com/repos/18F/dashboard/issues/300"},"comments":{"href":"https://api.github.com/repos/18F/dashboard/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/dashboard/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/dashboard/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/18F/dashboard/statuses/a6d9ffb517c32fbeb8a6c02e444ed309f4949df9"}}}}