GitHub PullRequestReviewCommentEvent at 2014-10-20 18:34:35
Repository: charmstore
Actor: urosj
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/juju/charmstore/pulls/comments/19103942","id":19103942,"diff_hunk":"@@ -362,7 +362,13 @@ func isNull(val interface{}) bool {\n func (r *Router) metaNames() []string {\n \tnames := make([]string, 0, len(r.handlers.Meta))\n \tfor name := range r.handlers.Meta {\n-\t\tnames = append(names, strings.TrimSuffix(name, \"/\"))\n+\t\t// Ensure that we don't generate duplicate entries\n+\t\t// when there's an entry for both \"x\" and \"x/\".\n+\t\ttrimmed := strings.TrimSuffix(name, \"/\")\n+\t\tif trimmed != name && r.handlers.Meta[trimmed] != nil {\n+\t\t\tcontinue\n+\t\t}\n+\t\tnames = append(names, trimmed)","path":"internal/router/router.go","position":11,"original_position":11,"commit_id":"aa128f6f98b296054d252a1f3380403be1a30856","original_commit_id":"aa128f6f98b296054d252a1f3380403be1a30856","user":{"login":"urosj","id":8036113,"avatar_url":"https://avatars.githubusercontent.com/u/8036113?v=2","gravatar_id":"","url":"https://api.github.com/users/urosj","html_url":"https://github.com/urosj","followers_url":"https://api.github.com/users/urosj/followers","following_url":"https://api.github.com/users/urosj/following{/other_user}","gists_url":"https://api.github.com/users/urosj/gists{/gist_id}","starred_url":"https://api.github.com/users/urosj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urosj/subscriptions","organizations_url":"https://api.github.com/users/urosj/orgs","repos_url":"https://api.github.com/users/urosj/repos","events_url":"https://api.github.com/users/urosj/events{/privacy}","received_events_url":"https://api.github.com/users/urosj/received_events","type":"User","site_admin":false},"body":"Good catch. ","created_at":"2014-10-20T18:34:35Z","updated_at":"2014-10-20T18:34:35Z","html_url":"https://github.com/juju/charmstore/pull/163#discussion_r19103942","pull_request_url":"https://api.github.com/repos/juju/charmstore/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/19103942"},"html":{"href":"https://github.com/juju/charmstore/pull/163#discussion_r19103942"},"pull_request":{"href":"https://api.github.com/repos/juju/charmstore/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/juju/charmstore/pulls/163","id":23029766,"html_url":"https://github.com/juju/charmstore/pull/163","diff_url":"https://github.com/juju/charmstore/pull/163.diff","patch_url":"https://github.com/juju/charmstore/pull/163.patch","issue_url":"https://api.github.com/repos/juju/charmstore/issues/163","number":163,"state":"open","locked":false,"title":"internal/v4: fix meta endpoints","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=2","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":"We were printing duplicate endpoints in the /meta list.\r\nAlso, when retrieving /meta/any with all meta endpoints included,\r\nit was failing because color was not recognised.","created_at":"2014-10-20T17:11:24Z","updated_at":"2014-10-20T18:34:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b89670156ea3dcbb672c76e72772d582ae785413","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/juju/charmstore/pulls/163/commits","review_comments_url":"https://api.github.com/repos/juju/charmstore/pulls/163/comments","review_comment_url":"https://api.github.com/repos/juju/charmstore/pulls/comments/{number}","comments_url":"https://api.github.com/repos/juju/charmstore/issues/163/comments","statuses_url":"https://api.github.com/repos/juju/charmstore/statuses/aa128f6f98b296054d252a1f3380403be1a30856","head":{"label":"rogpeppe:072-fix-metadata","ref":"072-fix-metadata","sha":"aa128f6f98b296054d252a1f3380403be1a30856","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=2","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=2","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":"2014-10-20T17:10:58Z","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":2646,"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":"4d18404c9d2c31e8a65bcb694dad52142c34811c","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars.githubusercontent.com/u/4604548?v=2","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=2","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":"2014-09-02T14:35:19Z","pushed_at":"2014-10-20T18:03:06Z","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":3409,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":8,"forks":11,"open_issues":8,"watchers":3,"default_branch":"v4"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/charmstore/pulls/163"},"html":{"href":"https://github.com/juju/charmstore/pull/163"},"issue":{"href":"https://api.github.com/repos/juju/charmstore/issues/163"},"comments":{"href":"https://api.github.com/repos/juju/charmstore/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/charmstore/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/charmstore/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/juju/charmstore/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/juju/charmstore/statuses/aa128f6f98b296054d252a1f3380403be1a30856"}}}}