{"action":"created","comment":{"url":"https://api.github.com/repos/juju/charm/pulls/comments/79515603","id":79515603,"diff_hunk":"@@ -41,17 +47,19 @@ type URL struct {\n \tSeries   string // \"precise\" or \"\" if unset; \"bundle\" if it's a bundle.\n }\n \n+const bundleSeries = \"bundle\"\n+\n var ErrUnresolvedUrl error = fmt.Errorf(\"charm or bundle url series is not resolved\")","path":"url.go","position":37,"original_position":37,"commit_id":"d1da90835703c22be1fd85d236d017ac879a6e76","original_commit_id":"d1da90835703c22be1fd85d236d017ac879a6e76","user":{"login":"mjs","id":14993,"avatar_url":"https://avatars.githubusercontent.com/u/14993?v=3","gravatar_id":"","url":"https://api.github.com/users/mjs","html_url":"https://github.com/mjs","followers_url":"https://api.github.com/users/mjs/followers","following_url":"https://api.github.com/users/mjs/following{/other_user}","gists_url":"https://api.github.com/users/mjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjs/subscriptions","organizations_url":"https://api.github.com/users/mjs/orgs","repos_url":"https://api.github.com/users/mjs/repos","events_url":"https://api.github.com/users/mjs/events{/privacy}","received_events_url":"https://api.github.com/users/mjs/received_events","type":"User","site_admin":false},"body":"This should probably live in the var block underneath it","created_at":"2016-09-20T00:11:21Z","updated_at":"2016-09-20T00:26:22Z","html_url":"https://github.com/juju/charm/pull/221#discussion_r79515603","pull_request_url":"https://api.github.com/repos/juju/charm/pulls/221","_links":{"self":{"href":"https://api.github.com/repos/juju/charm/pulls/comments/79515603"},"html":{"href":"https://github.com/juju/charm/pull/221#discussion_r79515603"},"pull_request":{"href":"https://api.github.com/repos/juju/charm/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/juju/charm/pulls/221","id":85884436,"html_url":"https://github.com/juju/charm/pull/221","diff_url":"https://github.com/juju/charm/pull/221.diff","patch_url":"https://github.com/juju/charm/pull/221.patch","issue_url":"https://api.github.com/repos/juju/charm/issues/221","number":221,"state":"open","locked":false,"title":"Add new preferred charm/bundle url format","user":{"login":"babbageclunk","id":563399,"avatar_url":"https://avatars.githubusercontent.com/u/563399?v=3","gravatar_id":"","url":"https://api.github.com/users/babbageclunk","html_url":"https://github.com/babbageclunk","followers_url":"https://api.github.com/users/babbageclunk/followers","following_url":"https://api.github.com/users/babbageclunk/following{/other_user}","gists_url":"https://api.github.com/users/babbageclunk/gists{/gist_id}","starred_url":"https://api.github.com/users/babbageclunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babbageclunk/subscriptions","organizations_url":"https://api.github.com/users/babbageclunk/orgs","repos_url":"https://api.github.com/users/babbageclunk/repos","events_url":"https://api.github.com/users/babbageclunk/events{/privacy}","received_events_url":"https://api.github.com/users/babbageclunk/received_events","type":"User","site_admin":false},"body":"Fixes http://pad.lv/1584193.\r\n\r\nThe new format is user/name/series/revision, with all of the fields but\r\nname being optional.\r\n\r\nIn the code this is called the V3 format. V1 is the\r\ncs:~user/series/name-revision format, and V2 are full jujucharms urls\r\nsuch as https://jujucharms.com/u/aisrael/mysql-benchmark/trusty/5. The\r\ncode still supports the old formats for backwards compatibility.\r\n\r\nTo distinguish between the V2 url series/name and the V3 url user/name\r\nwe need to use a list of series from juju/util/series.\r\n\r\nThe charmstore API doesn't yet support the url format that the UI does,\r\nso url.Path() returns the url in the V1 format so that we can request charm info.\r\nString() returns the preferred V3 format for displaying to the user.\r\n\r\nAs discussed in the bug, I've suppressed the \"bundle\" series in the display\r\nversion of the url - it's needed in the structure so the deploy command can \r\ndetect bundles and perform different deployment actions.","created_at":"2016-09-19T22:57:38Z","updated_at":"2016-09-20T00:26:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0531e9acbaf2b94f77a04e047b65f03f0e8afe11","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/charm/pulls/221/commits","review_comments_url":"https://api.github.com/repos/juju/charm/pulls/221/comments","review_comment_url":"https://api.github.com/repos/juju/charm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/charm/issues/221/comments","statuses_url":"https://api.github.com/repos/juju/charm/statuses/d1da90835703c22be1fd85d236d017ac879a6e76","head":{"label":"babbageclunk:new-url-format","ref":"new-url-format","sha":"d1da90835703c22be1fd85d236d017ac879a6e76","user":{"login":"babbageclunk","id":563399,"avatar_url":"https://avatars.githubusercontent.com/u/563399?v=3","gravatar_id":"","url":"https://api.github.com/users/babbageclunk","html_url":"https://github.com/babbageclunk","followers_url":"https://api.github.com/users/babbageclunk/followers","following_url":"https://api.github.com/users/babbageclunk/following{/other_user}","gists_url":"https://api.github.com/users/babbageclunk/gists{/gist_id}","starred_url":"https://api.github.com/users/babbageclunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babbageclunk/subscriptions","organizations_url":"https://api.github.com/users/babbageclunk/orgs","repos_url":"https://api.github.com/users/babbageclunk/repos","events_url":"https://api.github.com/users/babbageclunk/events{/privacy}","received_events_url":"https://api.github.com/users/babbageclunk/received_events","type":"User","site_admin":false},"repo":{"id":68297382,"name":"charm","full_name":"babbageclunk/charm","owner":{"login":"babbageclunk","id":563399,"avatar_url":"https://avatars.githubusercontent.com/u/563399?v=3","gravatar_id":"","url":"https://api.github.com/users/babbageclunk","html_url":"https://github.com/babbageclunk","followers_url":"https://api.github.com/users/babbageclunk/followers","following_url":"https://api.github.com/users/babbageclunk/following{/other_user}","gists_url":"https://api.github.com/users/babbageclunk/gists{/gist_id}","starred_url":"https://api.github.com/users/babbageclunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babbageclunk/subscriptions","organizations_url":"https://api.github.com/users/babbageclunk/orgs","repos_url":"https://api.github.com/users/babbageclunk/repos","events_url":"https://api.github.com/users/babbageclunk/events{/privacy}","received_events_url":"https://api.github.com/users/babbageclunk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/babbageclunk/charm","description":"Parsing and testing Juju charms","fork":true,"url":"https://api.github.com/repos/babbageclunk/charm","forks_url":"https://api.github.com/repos/babbageclunk/charm/forks","keys_url":"https://api.github.com/repos/babbageclunk/charm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babbageclunk/charm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babbageclunk/charm/teams","hooks_url":"https://api.github.com/repos/babbageclunk/charm/hooks","issue_events_url":"https://api.github.com/repos/babbageclunk/charm/issues/events{/number}","events_url":"https://api.github.com/repos/babbageclunk/charm/events","assignees_url":"https://api.github.com/repos/babbageclunk/charm/assignees{/user}","branches_url":"https://api.github.com/repos/babbageclunk/charm/branches{/branch}","tags_url":"https://api.github.com/repos/babbageclunk/charm/tags","blobs_url":"https://api.github.com/repos/babbageclunk/charm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babbageclunk/charm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babbageclunk/charm/git/refs{/sha}","trees_url":"https://api.github.com/repos/babbageclunk/charm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babbageclunk/charm/statuses/{sha}","languages_url":"https://api.github.com/repos/babbageclunk/charm/languages","stargazers_url":"https://api.github.com/repos/babbageclunk/charm/stargazers","contributors_url":"https://api.github.com/repos/babbageclunk/charm/contributors","subscribers_url":"https://api.github.com/repos/babbageclunk/charm/subscribers","subscription_url":"https://api.github.com/repos/babbageclunk/charm/subscription","commits_url":"https://api.github.com/repos/babbageclunk/charm/commits{/sha}","git_commits_url":"https://api.github.com/repos/babbageclunk/charm/git/commits{/sha}","comments_url":"https://api.github.com/repos/babbageclunk/charm/comments{/number}","issue_comment_url":"https://api.github.com/repos/babbageclunk/charm/issues/comments{/number}","contents_url":"https://api.github.com/repos/babbageclunk/charm/contents/{+path}","compare_url":"https://api.github.com/repos/babbageclunk/charm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babbageclunk/charm/merges","archive_url":"https://api.github.com/repos/babbageclunk/charm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babbageclunk/charm/downloads","issues_url":"https://api.github.com/repos/babbageclunk/charm/issues{/number}","pulls_url":"https://api.github.com/repos/babbageclunk/charm/pulls{/number}","milestones_url":"https://api.github.com/repos/babbageclunk/charm/milestones{/number}","notifications_url":"https://api.github.com/repos/babbageclunk/charm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babbageclunk/charm/labels{/name}","releases_url":"https://api.github.com/repos/babbageclunk/charm/releases{/id}","deployments_url":"https://api.github.com/repos/babbageclunk/charm/deployments","created_at":"2016-09-15T13:42:10Z","updated_at":"2016-09-15T13:42:11Z","pushed_at":"2016-09-19T23:03:01Z","git_url":"git://github.com/babbageclunk/charm.git","ssh_url":"git@github.com:babbageclunk/charm.git","clone_url":"https://github.com/babbageclunk/charm.git","svn_url":"https://github.com/babbageclunk/charm","homepage":null,"size":1259,"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":"v5"}},"base":{"label":"juju:v6-unstable","ref":"v6-unstable","sha":"e62786fbece4c6a74945d0d1d19140a69018c07d","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":20692246,"name":"charm","full_name":"juju/charm","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/charm","description":"Parsing and testing Juju charms","fork":false,"url":"https://api.github.com/repos/juju/charm","forks_url":"https://api.github.com/repos/juju/charm/forks","keys_url":"https://api.github.com/repos/juju/charm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/charm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/charm/teams","hooks_url":"https://api.github.com/repos/juju/charm/hooks","issue_events_url":"https://api.github.com/repos/juju/charm/issues/events{/number}","events_url":"https://api.github.com/repos/juju/charm/events","assignees_url":"https://api.github.com/repos/juju/charm/assignees{/user}","branches_url":"https://api.github.com/repos/juju/charm/branches{/branch}","tags_url":"https://api.github.com/repos/juju/charm/tags","blobs_url":"https://api.github.com/repos/juju/charm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/charm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/charm/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/charm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/charm/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/charm/languages","stargazers_url":"https://api.github.com/repos/juju/charm/stargazers","contributors_url":"https://api.github.com/repos/juju/charm/contributors","subscribers_url":"https://api.github.com/repos/juju/charm/subscribers","subscription_url":"https://api.github.com/repos/juju/charm/subscription","commits_url":"https://api.github.com/repos/juju/charm/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/charm/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/charm/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/charm/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/charm/contents/{+path}","compare_url":"https://api.github.com/repos/juju/charm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/charm/merges","archive_url":"https://api.github.com/repos/juju/charm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/charm/downloads","issues_url":"https://api.github.com/repos/juju/charm/issues{/number}","pulls_url":"https://api.github.com/repos/juju/charm/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/charm/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/charm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/charm/labels{/name}","releases_url":"https://api.github.com/repos/juju/charm/releases{/id}","deployments_url":"https://api.github.com/repos/juju/charm/deployments","created_at":"2014-06-10T16:11:32Z","updated_at":"2016-07-08T03:48:34Z","pushed_at":"2016-09-19T23:03:02Z","git_url":"git://github.com/juju/charm.git","ssh_url":"git@github.com:juju/charm.git","clone_url":"https://github.com/juju/charm.git","svn_url":"https://github.com/juju/charm","homepage":null,"size":1267,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":6,"forks":32,"open_issues":6,"watchers":2,"default_branch":"v5"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/charm/pulls/221"},"html":{"href":"https://github.com/juju/charm/pull/221"},"issue":{"href":"https://api.github.com/repos/juju/charm/issues/221"},"comments":{"href":"https://api.github.com/repos/juju/charm/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/charm/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/charm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/charm/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/juju/charm/statuses/d1da90835703c22be1fd85d236d017ac879a6e76"}}}}
{"actor":{"display_login":"mjs"}}