{"action":"created","comment":{"url":"https://api.github.com/repos/juju/charmstore/pulls/comments/26752017","id":26752017,"diff_hunk":"@@ -59,14 +59,14 @@ func New(store *charmstore.Store, config charmstore.ServerParams) *Handler {\n \t\t\t\"macaroon\":           router.HandleJSON(h.serveMacaroon),\n \t\t},\n \t\tId: map[string]router.IdHandler{\n-\t\t\t\"archive\":     h.authIdHandler(h.serveArchive),\n-\t\t\t\"archive/\":    h.authIdHandler(h.serveArchiveFile),\n-\t\t\t\"diagram.svg\": h.authIdHandler(h.serveDiagram),\n-\t\t\t\"expand-id\":   h.authIdHandler(h.serveExpandId),\n-\t\t\t\"icon.svg\":    h.authIdHandler(h.serveIcon),\n-\t\t\t\"readme\":      h.authIdHandler(h.serveReadMe),\n-\t\t\t\"resources\":   h.authIdHandler(h.serveResources),\n-\t\t\t\"promulgate\":  h.serveAdminPromulgate,\n+\t\t\t\"archive\":     h.serveArchive,\n+\t\t\t\"archive/\":    h.resolveId(h.authId(h.serveArchiveFile)),","path":"internal/v4/api.go","position":13,"original_position":13,"commit_id":"706293489c0d9c10e6659ff7920417495cede2eb","original_commit_id":"706293489c0d9c10e6659ff7920417495cede2eb","user":{"login":"frankban","id":1408172,"avatar_url":"https://avatars.githubusercontent.com/u/1408172?v=3","gravatar_id":"","url":"https://api.github.com/users/frankban","html_url":"https://github.com/frankban","followers_url":"https://api.github.com/users/frankban/followers","following_url":"https://api.github.com/users/frankban/following{/other_user}","gists_url":"https://api.github.com/users/frankban/gists{/gist_id}","starred_url":"https://api.github.com/users/frankban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankban/subscriptions","organizations_url":"https://api.github.com/users/frankban/orgs","repos_url":"https://api.github.com/users/frankban/repos","events_url":"https://api.github.com/users/frankban/events{/privacy}","received_events_url":"https://api.github.com/users/frankban/received_events","type":"User","site_admin":false},"body":"Nice!","created_at":"2015-03-19T13:17:43Z","updated_at":"2015-03-19T13:17:43Z","html_url":"https://github.com/juju/charmstore/pull/321#discussion_r26752017","pull_request_url":"https://api.github.com/repos/juju/charmstore/pulls/321","_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/26752017"},"html":{"href":"https://github.com/juju/charmstore/pull/321#discussion_r26752017"},"pull_request":{"href":"https://api.github.com/repos/juju/charmstore/pulls/321"}}},"pull_request":{"url":"https://api.github.com/repos/juju/charmstore/pulls/321","id":31430377,"html_url":"https://github.com/juju/charmstore/pull/321","diff_url":"https://github.com/juju/charmstore/pull/321.diff","patch_url":"https://github.com/juju/charmstore/pull/321.patch","issue_url":"https://api.github.com/repos/juju/charmstore/issues/321","number":321,"state":"open","locked":false,"title":"internal/router: make ResolveURL return ResolvedURL","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"body":"By doing this, we preserve whether the original URL specified by\r\nthe API client was promulgated or not, while still resolving\r\nentity URLs to their canonical (with user) form.\r\n\r\nInevitably this is a somewhat invasive change.\r\n\r\n","created_at":"2015-03-18T13:54:14Z","updated_at":"2015-03-19T13:17:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d917741e50d4ccc0422c4eb2c41d5d9893e93084","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/charmstore/pulls/321/commits","review_comments_url":"https://api.github.com/repos/juju/charmstore/pulls/321/comments","review_comment_url":"https://api.github.com/repos/juju/charmstore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/charmstore/issues/321/comments","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/706293489c0d9c10e6659ff7920417495cede2eb","head":{"label":"rogpeppe:116-router-resolved-url","ref":"116-router-resolved-url","sha":"706293489c0d9c10e6659ff7920417495cede2eb","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"repo":{"id":21278168,"name":"charmstore","full_name":"rogpeppe/charmstore","owner":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rogpeppe/charmstore","description":"The charm store server.","fork":true,"url":"https://api.github.com/repos/rogpeppe/charmstore","forks_url":"https://api.github.com/repos/rogpeppe/charmstore/forks","keys_url":"https://api.github.com/repos/rogpeppe/charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rogpeppe/charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rogpeppe/charmstore/teams","hooks_url":"https://api.github.com/repos/rogpeppe/charmstore/hooks","issue_events_url":"https://api.github.com/repos/rogpeppe/charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/rogpeppe/charmstore/events","assignees_url":"https://api.github.com/repos/rogpeppe/charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/rogpeppe/charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/rogpeppe/charmstore/tags","blobs_url":"https://api.github.com/repos/rogpeppe/charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rogpeppe/charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rogpeppe/charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/rogpeppe/charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rogpeppe/charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/rogpeppe/charmstore/languages","stargazers_url":"https://api.github.com/repos/rogpeppe/charmstore/stargazers","contributors_url":"https://api.github.com/repos/rogpeppe/charmstore/contributors","subscribers_url":"https://api.github.com/repos/rogpeppe/charmstore/subscribers","subscription_url":"https://api.github.com/repos/rogpeppe/charmstore/subscription","commits_url":"https://api.github.com/repos/rogpeppe/charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/rogpeppe/charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/rogpeppe/charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/rogpeppe/charmstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/rogpeppe/charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/rogpeppe/charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rogpeppe/charmstore/merges","archive_url":"https://api.github.com/repos/rogpeppe/charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rogpeppe/charmstore/downloads","issues_url":"https://api.github.com/repos/rogpeppe/charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/rogpeppe/charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/rogpeppe/charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/rogpeppe/charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rogpeppe/charmstore/labels{/name}","releases_url":"https://api.github.com/repos/rogpeppe/charmstore/releases{/id}","created_at":"2014-06-27T14:18:37Z","updated_at":"2014-06-27T13:23:16Z","pushed_at":"2015-03-19T09:25:51Z","git_url":"git://github.com/rogpeppe/charmstore.git","ssh_url":"git@github.com:rogpeppe/charmstore.git","clone_url":"https://github.com/rogpeppe/charmstore.git","svn_url":"https://github.com/rogpeppe/charmstore","homepage":null,"size":3314,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:v4","ref":"v4","sha":"fdd6c56e847ebbdbae3b166abaa67fa2b70baa77","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20720417,"name":"charmstore","full_name":"juju/charmstore","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=3","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/charmstore","description":"The charm store server.","fork":false,"url":"https://api.github.com/repos/juju/charmstore","forks_url":"https://api.github.com/repos/juju/charmstore/forks","keys_url":"https://api.github.com/repos/juju/charmstore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/charmstore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/charmstore/teams","hooks_url":"https://api.github.com/repos/juju/charmstore/hooks","issue_events_url":"https://api.github.com/repos/juju/charmstore/issues/events{/number}","events_url":"https://api.github.com/repos/juju/charmstore/events","assignees_url":"https://api.github.com/repos/juju/charmstore/assignees{/user}","branches_url":"https://api.github.com/repos/juju/charmstore/branches{/branch}","tags_url":"https://api.github.com/repos/juju/charmstore/tags","blobs_url":"https://api.github.com/repos/juju/charmstore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/charmstore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/charmstore/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/charmstore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/charmstore/languages","stargazers_url":"https://api.github.com/repos/juju/charmstore/stargazers","contributors_url":"https://api.github.com/repos/juju/charmstore/contributors","subscribers_url":"https://api.github.com/repos/juju/charmstore/subscribers","subscription_url":"https://api.github.com/repos/juju/charmstore/subscription","commits_url":"https://api.github.com/repos/juju/charmstore/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/charmstore/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/charmstore/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/charmstore/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/charmstore/contents/{+path}","compare_url":"https://api.github.com/repos/juju/charmstore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/charmstore/merges","archive_url":"https://api.github.com/repos/juju/charmstore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/charmstore/downloads","issues_url":"https://api.github.com/repos/juju/charmstore/issues{/number}","pulls_url":"https://api.github.com/repos/juju/charmstore/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/charmstore/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/charmstore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/charmstore/labels{/name}","releases_url":"https://api.github.com/repos/juju/charmstore/releases{/id}","created_at":"2014-06-11T09:53:37Z","updated_at":"2015-03-18T14:43:43Z","pushed_at":"2015-03-18T14:43:42Z","git_url":"git://github.com/juju/charmstore.git","ssh_url":"git@github.com:juju/charmstore.git","clone_url":"https://github.com/juju/charmstore.git","svn_url":"https://github.com/juju/charmstore","homepage":null,"size":4178,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":11,"forks":13,"open_issues":11,"watchers":6,"default_branch":"v4"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/321"},"html":{"href":"https://github.com/juju/charmstore/pull/321"},"issue":{"href":"https://api.github.com/repos/juju/charmstore/issues/321"},"comments":{"href":"https://api.github.com/repos/juju/charmstore/issues/321/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/charmstore/pulls/321/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/charmstore/pulls/321/commits"},"statuses":{"href":"https://api.github.com/repos/juju/charmstore/statuses/706293489c0d9c10e6659ff7920417495cede2eb"}}}}