{"action":"closed","number":44,"pull_request":{"url":"https://api.github.com/repos/progrium/viewdocs/pulls/44","id":60080374,"html_url":"https://github.com/progrium/viewdocs/pull/44","diff_url":"https://github.com/progrium/viewdocs/pull/44.diff","patch_url":"https://github.com/progrium/viewdocs/pull/44.patch","issue_url":"https://api.github.com/repos/progrium/viewdocs/issues/44","number":44,"state":"closed","locked":false,"title":"Properly handle linking to versioned docs","user":{"login":"josegonzalez","id":65675,"avatar_url":"https://avatars.githubusercontent.com/u/65675?v=3","gravatar_id":"","url":"https://api.github.com/users/josegonzalez","html_url":"https://github.com/josegonzalez","followers_url":"https://api.github.com/users/josegonzalez/followers","following_url":"https://api.github.com/users/josegonzalez/following{/other_user}","gists_url":"https://api.github.com/users/josegonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/josegonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josegonzalez/subscriptions","organizations_url":"https://api.github.com/users/josegonzalez/orgs","repos_url":"https://api.github.com/users/josegonzalez/repos","events_url":"https://api.github.com/users/josegonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/josegonzalez/received_events","type":"User","site_admin":false},"body":"This PR allows us to link to older doc links, which is hella useful for breaking changes...\r\n\r\nPreviously, you could externally link to a versioned copy of a given doc\r\npage, but navigating with that version was not properly supported. This made\r\nit difficult to provide support for major version changes within dokku.\r\n\r\nThis change does two things:\r\n\r\n- Strips the hostname from the link\r\n- Replaces bare repository link prefixes with a versioned link\r\n\r\nWith the former change, the following link:\r\n\r\n    <a href=\"http://progrium.dokku.io/viewdocs/development\">Development</a>\r\n\r\nBecomes:\r\n\r\n    <a href=\"/viewdocs/development\">Development</a>\r\n\r\nThis makes it easy to do the second change (assuming the branch name `dev`):\r\n\r\n    <a href=\"/viewdocs/development\">Development</a>\r\n\r\nBecomes:\r\n\r\n    <a href=\"/viewdocs~dev/development\">Development</a>","created_at":"2016-02-21T09:26:49Z","updated_at":"2016-02-21T16:20:06Z","closed_at":"2016-02-21T16:20:06Z","merged_at":"2016-02-21T16:20:06Z","merge_commit_sha":"b491d0b4d0a3d7d96249b1cd313e69fc93fd7913","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/progrium/viewdocs/pulls/44/commits","review_comments_url":"https://api.github.com/repos/progrium/viewdocs/pulls/44/comments","review_comment_url":"https://api.github.com/repos/progrium/viewdocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/progrium/viewdocs/issues/44/comments","statuses_url":"https://api.github.com/repos/progrium/viewdocs/statuses/117da514da5830e95b92d2b8712fd358e14f547a","head":{"label":"progrium:relative-doc-links","ref":"relative-doc-links","sha":"117da514da5830e95b92d2b8712fd358e14f547a","user":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"repo":{"id":14193788,"name":"viewdocs","full_name":"progrium/viewdocs","owner":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/progrium/viewdocs","description":"Read the Docs meets Gist.io for simple Markdown project documentation","fork":false,"url":"https://api.github.com/repos/progrium/viewdocs","forks_url":"https://api.github.com/repos/progrium/viewdocs/forks","keys_url":"https://api.github.com/repos/progrium/viewdocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/progrium/viewdocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/progrium/viewdocs/teams","hooks_url":"https://api.github.com/repos/progrium/viewdocs/hooks","issue_events_url":"https://api.github.com/repos/progrium/viewdocs/issues/events{/number}","events_url":"https://api.github.com/repos/progrium/viewdocs/events","assignees_url":"https://api.github.com/repos/progrium/viewdocs/assignees{/user}","branches_url":"https://api.github.com/repos/progrium/viewdocs/branches{/branch}","tags_url":"https://api.github.com/repos/progrium/viewdocs/tags","blobs_url":"https://api.github.com/repos/progrium/viewdocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/progrium/viewdocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/progrium/viewdocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/progrium/viewdocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/progrium/viewdocs/statuses/{sha}","languages_url":"https://api.github.com/repos/progrium/viewdocs/languages","stargazers_url":"https://api.github.com/repos/progrium/viewdocs/stargazers","contributors_url":"https://api.github.com/repos/progrium/viewdocs/contributors","subscribers_url":"https://api.github.com/repos/progrium/viewdocs/subscribers","subscription_url":"https://api.github.com/repos/progrium/viewdocs/subscription","commits_url":"https://api.github.com/repos/progrium/viewdocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/progrium/viewdocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/progrium/viewdocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/progrium/viewdocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/progrium/viewdocs/contents/{+path}","compare_url":"https://api.github.com/repos/progrium/viewdocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/progrium/viewdocs/merges","archive_url":"https://api.github.com/repos/progrium/viewdocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/progrium/viewdocs/downloads","issues_url":"https://api.github.com/repos/progrium/viewdocs/issues{/number}","pulls_url":"https://api.github.com/repos/progrium/viewdocs/pulls{/number}","milestones_url":"https://api.github.com/repos/progrium/viewdocs/milestones{/number}","notifications_url":"https://api.github.com/repos/progrium/viewdocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/progrium/viewdocs/labels{/name}","releases_url":"https://api.github.com/repos/progrium/viewdocs/releases{/id}","deployments_url":"https://api.github.com/repos/progrium/viewdocs/deployments","created_at":"2013-11-07T04:03:48Z","updated_at":"2016-02-15T06:50:40Z","pushed_at":"2016-02-21T16:20:06Z","git_url":"git://github.com/progrium/viewdocs.git","ssh_url":"git@github.com:progrium/viewdocs.git","clone_url":"https://github.com/progrium/viewdocs.git","svn_url":"https://github.com/progrium/viewdocs","homepage":"http://viewdocs.io","size":139,"stargazers_count":152,"watchers_count":152,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":3,"forks":21,"open_issues":3,"watchers":152,"default_branch":"master"}},"base":{"label":"progrium:master","ref":"master","sha":"fb58500a9f4d20b94c84582f45f981c75795e877","user":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"repo":{"id":14193788,"name":"viewdocs","full_name":"progrium/viewdocs","owner":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/progrium/viewdocs","description":"Read the Docs meets Gist.io for simple Markdown project documentation","fork":false,"url":"https://api.github.com/repos/progrium/viewdocs","forks_url":"https://api.github.com/repos/progrium/viewdocs/forks","keys_url":"https://api.github.com/repos/progrium/viewdocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/progrium/viewdocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/progrium/viewdocs/teams","hooks_url":"https://api.github.com/repos/progrium/viewdocs/hooks","issue_events_url":"https://api.github.com/repos/progrium/viewdocs/issues/events{/number}","events_url":"https://api.github.com/repos/progrium/viewdocs/events","assignees_url":"https://api.github.com/repos/progrium/viewdocs/assignees{/user}","branches_url":"https://api.github.com/repos/progrium/viewdocs/branches{/branch}","tags_url":"https://api.github.com/repos/progrium/viewdocs/tags","blobs_url":"https://api.github.com/repos/progrium/viewdocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/progrium/viewdocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/progrium/viewdocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/progrium/viewdocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/progrium/viewdocs/statuses/{sha}","languages_url":"https://api.github.com/repos/progrium/viewdocs/languages","stargazers_url":"https://api.github.com/repos/progrium/viewdocs/stargazers","contributors_url":"https://api.github.com/repos/progrium/viewdocs/contributors","subscribers_url":"https://api.github.com/repos/progrium/viewdocs/subscribers","subscription_url":"https://api.github.com/repos/progrium/viewdocs/subscription","commits_url":"https://api.github.com/repos/progrium/viewdocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/progrium/viewdocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/progrium/viewdocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/progrium/viewdocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/progrium/viewdocs/contents/{+path}","compare_url":"https://api.github.com/repos/progrium/viewdocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/progrium/viewdocs/merges","archive_url":"https://api.github.com/repos/progrium/viewdocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/progrium/viewdocs/downloads","issues_url":"https://api.github.com/repos/progrium/viewdocs/issues{/number}","pulls_url":"https://api.github.com/repos/progrium/viewdocs/pulls{/number}","milestones_url":"https://api.github.com/repos/progrium/viewdocs/milestones{/number}","notifications_url":"https://api.github.com/repos/progrium/viewdocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/progrium/viewdocs/labels{/name}","releases_url":"https://api.github.com/repos/progrium/viewdocs/releases{/id}","deployments_url":"https://api.github.com/repos/progrium/viewdocs/deployments","created_at":"2013-11-07T04:03:48Z","updated_at":"2016-02-15T06:50:40Z","pushed_at":"2016-02-21T16:20:06Z","git_url":"git://github.com/progrium/viewdocs.git","ssh_url":"git@github.com:progrium/viewdocs.git","clone_url":"https://github.com/progrium/viewdocs.git","svn_url":"https://github.com/progrium/viewdocs","homepage":"http://viewdocs.io","size":139,"stargazers_count":152,"watchers_count":152,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":3,"forks":21,"open_issues":3,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/progrium/viewdocs/pulls/44"},"html":{"href":"https://github.com/progrium/viewdocs/pull/44"},"issue":{"href":"https://api.github.com/repos/progrium/viewdocs/issues/44"},"comments":{"href":"https://api.github.com/repos/progrium/viewdocs/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/progrium/viewdocs/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/progrium/viewdocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/progrium/viewdocs/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/progrium/viewdocs/statuses/117da514da5830e95b92d2b8712fd358e14f547a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"progrium","id":647,"avatar_url":"https://avatars.githubusercontent.com/u/647?v=3","gravatar_id":"","url":"https://api.github.com/users/progrium","html_url":"https://github.com/progrium","followers_url":"https://api.github.com/users/progrium/followers","following_url":"https://api.github.com/users/progrium/following{/other_user}","gists_url":"https://api.github.com/users/progrium/gists{/gist_id}","starred_url":"https://api.github.com/users/progrium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/progrium/subscriptions","organizations_url":"https://api.github.com/users/progrium/orgs","repos_url":"https://api.github.com/users/progrium/repos","events_url":"https://api.github.com/users/progrium/events{/privacy}","received_events_url":"https://api.github.com/users/progrium/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":3,"additions":15,"deletions":10,"changed_files":2}}