{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/113524307","pull_request_review_id":34920435,"id":113524307,"diff_hunk":"@@ -38,61 +38,48 @@ type xauth struct {\n \tData    []byte\n }\n \n-func readBytes(f *os.File, data []byte) error {\n-\tn, err := f.Read(data)\n-\tif err != nil {\n-\t\treturn err\n-\t}\n-\n-\tif n != len(data) {\n-\t\treturn fmt.Errorf(\"Could not read enough bytes\")\n-\t}\n-\n-\treturn nil\n-}\n-\n-func readChunk(f *os.File) ([]byte, error) {\n+func readChunk(r io.Reader) ([]byte, error) {\n \t// A chunk consists of a length encoded by two bytes and\n \t// additional data which is the real value of the item\n \t// we reading here from the file.\n \n \tb := [2]byte{}\n-\tif err := readBytes(f, b[:]); err != nil {\n+\tif _, err := io.ReadFull(r, b[:]); err != nil {","path":"x11/xauth.go","position":25,"original_position":25,"commit_id":"06e458efe8993d44ca2800ab5ae89bbab287ca15","original_commit_id":"06e458efe8993d44ca2800ab5ae89bbab287ca15","user":{"login":"mvo5","id":914418,"avatar_url":"https://avatars0.githubusercontent.com/u/914418?v=3","gravatar_id":"","url":"https://api.github.com/users/mvo5","html_url":"https://github.com/mvo5","followers_url":"https://api.github.com/users/mvo5/followers","following_url":"https://api.github.com/users/mvo5/following{/other_user}","gists_url":"https://api.github.com/users/mvo5/gists{/gist_id}","starred_url":"https://api.github.com/users/mvo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvo5/subscriptions","organizations_url":"https://api.github.com/users/mvo5/orgs","repos_url":"https://api.github.com/users/mvo5/repos","events_url":"https://api.github.com/users/mvo5/events{/privacy}","received_events_url":"https://api.github.com/users/mvo5/received_events","type":"User","site_admin":false},"body":"Nice!","created_at":"2017-04-26T18:10:38Z","updated_at":"2017-04-26T18:11:04Z","html_url":"https://github.com/snapcore/snapd/pull/3244#discussion_r113524307","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/3244","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/113524307"},"html":{"href":"https://github.com/snapcore/snapd/pull/3244#discussion_r113524307"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/3244"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/3244","id":117743535,"html_url":"https://github.com/snapcore/snapd/pull/3244","diff_url":"https://github.com/snapcore/snapd/pull/3244.diff","patch_url":"https://github.com/snapcore/snapd/pull/3244.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/3244","number":3244,"state":"open","locked":false,"title":"many: fix review comments from PR #3177","user":{"login":"morphis","id":433752,"avatar_url":"https://avatars1.githubusercontent.com/u/433752?v=3","gravatar_id":"","url":"https://api.github.com/users/morphis","html_url":"https://github.com/morphis","followers_url":"https://api.github.com/users/morphis/followers","following_url":"https://api.github.com/users/morphis/following{/other_user}","gists_url":"https://api.github.com/users/morphis/gists{/gist_id}","starred_url":"https://api.github.com/users/morphis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morphis/subscriptions","organizations_url":"https://api.github.com/users/morphis/orgs","repos_url":"https://api.github.com/users/morphis/repos","events_url":"https://api.github.com/users/morphis/events{/privacy}","received_events_url":"https://api.github.com/users/morphis/received_events","type":"User","site_admin":false},"body":"Based on feedback from @niemeyer on https://github.com/snapcore/snapd/pull/3177","created_at":"2017-04-26T15:29:19Z","updated_at":"2017-04-26T18:11:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"198cd739aa315caa2723f0ba8047e606f5ded557","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/snapcore/snapd/milestones/9","html_url":"https://github.com/snapcore/snapd/milestone/9","labels_url":"https://api.github.com/repos/snapcore/snapd/milestones/9/labels","id":2439897,"number":9,"title":"2.25","description":"","creator":{"login":"mvo5","id":914418,"avatar_url":"https://avatars0.githubusercontent.com/u/914418?v=3","gravatar_id":"","url":"https://api.github.com/users/mvo5","html_url":"https://github.com/mvo5","followers_url":"https://api.github.com/users/mvo5/followers","following_url":"https://api.github.com/users/mvo5/following{/other_user}","gists_url":"https://api.github.com/users/mvo5/gists{/gist_id}","starred_url":"https://api.github.com/users/mvo5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvo5/subscriptions","organizations_url":"https://api.github.com/users/mvo5/orgs","repos_url":"https://api.github.com/users/mvo5/repos","events_url":"https://api.github.com/users/mvo5/events{/privacy}","received_events_url":"https://api.github.com/users/mvo5/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":20,"state":"open","created_at":"2017-04-06T15:23:14Z","updated_at":"2017-04-26T18:09:31Z","due_on":"2017-04-25T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/3244/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/3244/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/3244/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/06e458efe8993d44ca2800ab5ae89bbab287ca15","head":{"label":"morphis:f/fix-auth","ref":"f/fix-auth","sha":"06e458efe8993d44ca2800ab5ae89bbab287ca15","user":{"login":"morphis","id":433752,"avatar_url":"https://avatars1.githubusercontent.com/u/433752?v=3","gravatar_id":"","url":"https://api.github.com/users/morphis","html_url":"https://github.com/morphis","followers_url":"https://api.github.com/users/morphis/followers","following_url":"https://api.github.com/users/morphis/following{/other_user}","gists_url":"https://api.github.com/users/morphis/gists{/gist_id}","starred_url":"https://api.github.com/users/morphis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morphis/subscriptions","organizations_url":"https://api.github.com/users/morphis/orgs","repos_url":"https://api.github.com/users/morphis/repos","events_url":"https://api.github.com/users/morphis/events{/privacy}","received_events_url":"https://api.github.com/users/morphis/received_events","type":"User","site_admin":false},"repo":{"id":56325721,"name":"snapd","full_name":"morphis/snapd","owner":{"login":"morphis","id":433752,"avatar_url":"https://avatars1.githubusercontent.com/u/433752?v=3","gravatar_id":"","url":"https://api.github.com/users/morphis","html_url":"https://github.com/morphis","followers_url":"https://api.github.com/users/morphis/followers","following_url":"https://api.github.com/users/morphis/following{/other_user}","gists_url":"https://api.github.com/users/morphis/gists{/gist_id}","starred_url":"https://api.github.com/users/morphis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morphis/subscriptions","organizations_url":"https://api.github.com/users/morphis/orgs","repos_url":"https://api.github.com/users/morphis/repos","events_url":"https://api.github.com/users/morphis/events{/privacy}","received_events_url":"https://api.github.com/users/morphis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morphis/snapd","description":"Snappy is the software at the heart of Ubuntu Core.","fork":true,"url":"https://api.github.com/repos/morphis/snapd","forks_url":"https://api.github.com/repos/morphis/snapd/forks","keys_url":"https://api.github.com/repos/morphis/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morphis/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morphis/snapd/teams","hooks_url":"https://api.github.com/repos/morphis/snapd/hooks","issue_events_url":"https://api.github.com/repos/morphis/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/morphis/snapd/events","assignees_url":"https://api.github.com/repos/morphis/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/morphis/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/morphis/snapd/tags","blobs_url":"https://api.github.com/repos/morphis/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morphis/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morphis/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/morphis/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morphis/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/morphis/snapd/languages","stargazers_url":"https://api.github.com/repos/morphis/snapd/stargazers","contributors_url":"https://api.github.com/repos/morphis/snapd/contributors","subscribers_url":"https://api.github.com/repos/morphis/snapd/subscribers","subscription_url":"https://api.github.com/repos/morphis/snapd/subscription","commits_url":"https://api.github.com/repos/morphis/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/morphis/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/morphis/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/morphis/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/morphis/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/morphis/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morphis/snapd/merges","archive_url":"https://api.github.com/repos/morphis/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morphis/snapd/downloads","issues_url":"https://api.github.com/repos/morphis/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/morphis/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/morphis/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/morphis/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morphis/snapd/labels{/name}","releases_url":"https://api.github.com/repos/morphis/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/morphis/snapd/deployments","created_at":"2016-04-15T14:21:22Z","updated_at":"2016-07-19T15:18:36Z","pushed_at":"2017-04-26T15:29:07Z","git_url":"git://github.com/morphis/snapd.git","ssh_url":"git@github.com:morphis/snapd.git","clone_url":"https://github.com/morphis/snapd.git","svn_url":"https://github.com/morphis/snapd","homepage":null,"size":46300,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"snapcore:master","ref":"master","sha":"0ddb06ca364ef4a210e5627feb1abfbe544b3e41","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars2.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars2.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2017-04-26T16:30:32Z","pushed_at":"2017-04-26T16:04:06Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":46405,"stargazers_count":700,"watchers_count":700,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":37,"forks":169,"open_issues":37,"watchers":700,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/3244"},"html":{"href":"https://github.com/snapcore/snapd/pull/3244"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/3244"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/3244/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/3244/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/3244/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/06e458efe8993d44ca2800ab5ae89bbab287ca15"}}}}
{"actor":{"display_login":"mvo5"}}