{"action":"created","comment":{"url":"https://api.github.com/repos/docker/notary/pulls/comments/47290735","id":47290735,"diff_hunk":"@@ -80,9 +80,21 @@ func validateUpdate(cs signed.CryptoService, gun string, updates []storage.MetaU\n \t\t\treturn nil, ErrBadTargets{msg: err.Error()}\n \t\t}\n \t\trepo.SetTargets(targetsRole, t)\n+\t} else {\n+\t\ttargetsJSON, err := store.GetCurrent(gun, data.CanonicalTargetsRole)\n+\t\tif err != nil {\n+\t\t\treturn nil, fmt.Errorf(\"could not load repo for snapshot generation: %v\", err)","path":"server/handlers/validation.go","position":7,"original_position":7,"commit_id":"4f0853005eeed5ea6c7f0f19744507faa61b8ca4","original_commit_id":"4f0853005eeed5ea6c7f0f19744507faa61b8ca4","user":{"login":"cyli","id":223200,"avatar_url":"https://avatars.githubusercontent.com/u/223200?v=3","gravatar_id":"","url":"https://api.github.com/users/cyli","html_url":"https://github.com/cyli","followers_url":"https://api.github.com/users/cyli/followers","following_url":"https://api.github.com/users/cyli/following{/other_user}","gists_url":"https://api.github.com/users/cyli/gists{/gist_id}","starred_url":"https://api.github.com/users/cyli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyli/subscriptions","organizations_url":"https://api.github.com/users/cyli/orgs","repos_url":"https://api.github.com/users/cyli/repos","events_url":"https://api.github.com/users/cyli/events{/privacy}","received_events_url":"https://api.github.com/users/cyli/received_events","type":"User","site_admin":false},"body":"Anyway, sorry, this is just bikeshedding the error message :)  We can modify it later, too.  ","created_at":"2015-12-10T21:45:06Z","updated_at":"2015-12-10T21:45:06Z","html_url":"https://github.com/docker/notary/pull/349#discussion_r47290735","pull_request_url":"https://api.github.com/repos/docker/notary/pulls/349","_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/comments/47290735"},"html":{"href":"https://github.com/docker/notary/pull/349#discussion_r47290735"},"pull_request":{"href":"https://api.github.com/repos/docker/notary/pulls/349"}}},"pull_request":{"url":"https://api.github.com/repos/docker/notary/pulls/349","id":53163129,"html_url":"https://github.com/docker/notary/pull/349","diff_url":"https://github.com/docker/notary/pull/349.diff","patch_url":"https://github.com/docker/notary/pull/349.patch","issue_url":"https://api.github.com/repos/docker/notary/issues/349","number":349,"state":"open","locked":false,"title":"fixing bugs raised by @mtrmac","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"body":"cc @mtrmac (not sure if the title inclusion will ping)\r\n\r\nc.f. https://github.com/docker/notary/pull/332\r\n\r\nSigned-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)","created_at":"2015-12-09T19:05:11Z","updated_at":"2015-12-10T21:45:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c447dbf2a1a04dab6efc79f91a29d6d59d1b9f62","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/notary/pulls/349/commits","review_comments_url":"https://api.github.com/repos/docker/notary/pulls/349/comments","review_comment_url":"https://api.github.com/repos/docker/notary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/notary/issues/349/comments","statuses_url":"https://api.github.com/repos/docker/notary/statuses/4f0853005eeed5ea6c7f0f19744507faa61b8ca4","head":{"label":"endophage:server_snapshot_bugfixes","ref":"server_snapshot_bugfixes","sha":"4f0853005eeed5ea6c7f0f19744507faa61b8ca4","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"repo":{"id":37937558,"name":"notary","full_name":"endophage/notary","owner":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/endophage/notary","description":"","fork":true,"url":"https://api.github.com/repos/endophage/notary","forks_url":"https://api.github.com/repos/endophage/notary/forks","keys_url":"https://api.github.com/repos/endophage/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endophage/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endophage/notary/teams","hooks_url":"https://api.github.com/repos/endophage/notary/hooks","issue_events_url":"https://api.github.com/repos/endophage/notary/issues/events{/number}","events_url":"https://api.github.com/repos/endophage/notary/events","assignees_url":"https://api.github.com/repos/endophage/notary/assignees{/user}","branches_url":"https://api.github.com/repos/endophage/notary/branches{/branch}","tags_url":"https://api.github.com/repos/endophage/notary/tags","blobs_url":"https://api.github.com/repos/endophage/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endophage/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endophage/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/endophage/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endophage/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/endophage/notary/languages","stargazers_url":"https://api.github.com/repos/endophage/notary/stargazers","contributors_url":"https://api.github.com/repos/endophage/notary/contributors","subscribers_url":"https://api.github.com/repos/endophage/notary/subscribers","subscription_url":"https://api.github.com/repos/endophage/notary/subscription","commits_url":"https://api.github.com/repos/endophage/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/endophage/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/endophage/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/endophage/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/endophage/notary/contents/{+path}","compare_url":"https://api.github.com/repos/endophage/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endophage/notary/merges","archive_url":"https://api.github.com/repos/endophage/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endophage/notary/downloads","issues_url":"https://api.github.com/repos/endophage/notary/issues{/number}","pulls_url":"https://api.github.com/repos/endophage/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/endophage/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/endophage/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endophage/notary/labels{/name}","releases_url":"https://api.github.com/repos/endophage/notary/releases{/id}","created_at":"2015-06-23T18:35:21Z","updated_at":"2015-06-23T18:35:27Z","pushed_at":"2015-12-10T16:27:24Z","git_url":"git://github.com/endophage/notary.git","ssh_url":"git@github.com:endophage/notary.git","clone_url":"https://github.com/endophage/notary.git","svn_url":"https://github.com/endophage/notary","homepage":"","size":21741,"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":"docker:master","ref":"master","sha":"2bfadacf34efebf237f06d222a746d62d7dba1e3","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":37743436,"name":"notary","full_name":"docker/notary","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/notary","description":"","fork":false,"url":"https://api.github.com/repos/docker/notary","forks_url":"https://api.github.com/repos/docker/notary/forks","keys_url":"https://api.github.com/repos/docker/notary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/notary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/notary/teams","hooks_url":"https://api.github.com/repos/docker/notary/hooks","issue_events_url":"https://api.github.com/repos/docker/notary/issues/events{/number}","events_url":"https://api.github.com/repos/docker/notary/events","assignees_url":"https://api.github.com/repos/docker/notary/assignees{/user}","branches_url":"https://api.github.com/repos/docker/notary/branches{/branch}","tags_url":"https://api.github.com/repos/docker/notary/tags","blobs_url":"https://api.github.com/repos/docker/notary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/notary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/notary/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/notary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/notary/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/notary/languages","stargazers_url":"https://api.github.com/repos/docker/notary/stargazers","contributors_url":"https://api.github.com/repos/docker/notary/contributors","subscribers_url":"https://api.github.com/repos/docker/notary/subscribers","subscription_url":"https://api.github.com/repos/docker/notary/subscription","commits_url":"https://api.github.com/repos/docker/notary/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/notary/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/notary/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/notary/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/notary/contents/{+path}","compare_url":"https://api.github.com/repos/docker/notary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/notary/merges","archive_url":"https://api.github.com/repos/docker/notary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/notary/downloads","issues_url":"https://api.github.com/repos/docker/notary/issues{/number}","pulls_url":"https://api.github.com/repos/docker/notary/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/notary/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/notary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/notary/labels{/name}","releases_url":"https://api.github.com/repos/docker/notary/releases{/id}","created_at":"2015-06-19T20:07:53Z","updated_at":"2015-12-10T06:21:19Z","pushed_at":"2015-12-10T18:16:59Z","git_url":"git://github.com/docker/notary.git","ssh_url":"git@github.com:docker/notary.git","clone_url":"https://github.com/docker/notary.git","svn_url":"https://github.com/docker/notary","homepage":null,"size":21957,"stargazers_count":446,"watchers_count":446,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":45,"forks":61,"open_issues":45,"watchers":446,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/notary/pulls/349"},"html":{"href":"https://github.com/docker/notary/pull/349"},"issue":{"href":"https://api.github.com/repos/docker/notary/issues/349"},"comments":{"href":"https://api.github.com/repos/docker/notary/issues/349/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/notary/pulls/349/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/notary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/notary/pulls/349/commits"},"statuses":{"href":"https://api.github.com/repos/docker/notary/statuses/4f0853005eeed5ea6c7f0f19744507faa61b8ca4"}}}}