{"action":"created","comment":{"url":"https://api.github.com/repos/nyaxt/webpackage/pulls/comments/180328788","pull_request_review_id":110729233,"id":180328788,"diff_hunk":"@@ -57,3 +58,33 @@ func Encode(w io.Writer, buf []byte, recordSize int) (string, error) {\n \tmi := \"mi-sha256=\" + base64.RawURLEncoding.EncodeToString(proofs[0])\n \treturn mi, nil\n }\n+\n+func Decode(w io.Writer, r io.Reader, miHeaderValue string) error {\n+\tvar recordSize uint64\n+\tif err := binary.Read(r, binary.BigEndian, &recordSize); err != nil {\n+\t\treturn fmt.Errorf(\"Failed to read recordSize: %v\", err)\n+\t}\n+\n+\tproof := make([]byte, sha256.Size)\n+\trecord := make([]byte, recordSize)\n+\treadFirstRecord := false\n+\tfor {\n+\t\tif readFirstRecord {\n+\t\t\tif _, err := r.Read(proof); err != nil {\n+\t\t\t\tif err == io.EOF {\n+\t\t\t\t\treturn nil\n+\t\t\t\t}\n+\t\t\t\treturn fmt.Errorf(\"Failed to read proof: %v\", err)\n+\t\t\t}\n+\t\t}\n+\t\treadFirstRecord = true\n+\t\tn, err := r.Read(record)","path":"go/signedexchange/mice/mice.go","position":32,"original_position":32,"commit_id":"69120a743f4a5e52fc8ce33e9c9fcebef650a45b","original_commit_id":"69120a743f4a5e52fc8ce33e9c9fcebef650a45b","user":{"login":"hajimehoshi","id":16950,"avatar_url":"https://avatars2.githubusercontent.com/u/16950?v=4","gravatar_id":"","url":"https://api.github.com/users/hajimehoshi","html_url":"https://github.com/hajimehoshi","followers_url":"https://api.github.com/users/hajimehoshi/followers","following_url":"https://api.github.com/users/hajimehoshi/following{/other_user}","gists_url":"https://api.github.com/users/hajimehoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/hajimehoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hajimehoshi/subscriptions","organizations_url":"https://api.github.com/users/hajimehoshi/orgs","repos_url":"https://api.github.com/users/hajimehoshi/repos","events_url":"https://api.github.com/users/hajimehoshi/events{/privacy}","received_events_url":"https://api.github.com/users/hajimehoshi/received_events","type":"User","site_admin":false},"body":"ditto","created_at":"2018-04-10T08:04:59Z","updated_at":"2018-04-10T08:07:57Z","html_url":"https://github.com/nyaxt/webpackage/pull/13#discussion_r180328788","pull_request_url":"https://api.github.com/repos/nyaxt/webpackage/pulls/13","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/comments/180328788"},"html":{"href":"https://github.com/nyaxt/webpackage/pull/13#discussion_r180328788"},"pull_request":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/nyaxt/webpackage/pulls/13","id":180208971,"html_url":"https://github.com/nyaxt/webpackage/pull/13","diff_url":"https://github.com/nyaxt/webpackage/pull/13.diff","patch_url":"https://github.com/nyaxt/webpackage/pull/13.patch","issue_url":"https://api.github.com/repos/nyaxt/webpackage/issues/13","number":13,"state":"open","locked":false,"title":"introduce dump-signedexchange tool","user":{"login":"nyaxt","id":18355,"avatar_url":"https://avatars2.githubusercontent.com/u/18355?v=4","gravatar_id":"","url":"https://api.github.com/users/nyaxt","html_url":"https://github.com/nyaxt","followers_url":"https://api.github.com/users/nyaxt/followers","following_url":"https://api.github.com/users/nyaxt/following{/other_user}","gists_url":"https://api.github.com/users/nyaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaxt/subscriptions","organizations_url":"https://api.github.com/users/nyaxt/orgs","repos_url":"https://api.github.com/users/nyaxt/repos","events_url":"https://api.github.com/users/nyaxt/events{/privacy}","received_events_url":"https://api.github.com/users/nyaxt/received_events","type":"User","site_admin":false},"body":"PTAL","created_at":"2018-04-09T04:34:31Z","updated_at":"2018-04-10T08:07:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"23db2f60e22b6eb52f8dcaaffc10527ae7bf525e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nyaxt/webpackage/pulls/13/commits","review_comments_url":"https://api.github.com/repos/nyaxt/webpackage/pulls/13/comments","review_comment_url":"https://api.github.com/repos/nyaxt/webpackage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nyaxt/webpackage/issues/13/comments","statuses_url":"https://api.github.com/repos/nyaxt/webpackage/statuses/69120a743f4a5e52fc8ce33e9c9fcebef650a45b","head":{"label":"nyaxt:dump-se","ref":"dump-se","sha":"69120a743f4a5e52fc8ce33e9c9fcebef650a45b","user":{"login":"nyaxt","id":18355,"avatar_url":"https://avatars2.githubusercontent.com/u/18355?v=4","gravatar_id":"","url":"https://api.github.com/users/nyaxt","html_url":"https://github.com/nyaxt","followers_url":"https://api.github.com/users/nyaxt/followers","following_url":"https://api.github.com/users/nyaxt/following{/other_user}","gists_url":"https://api.github.com/users/nyaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaxt/subscriptions","organizations_url":"https://api.github.com/users/nyaxt/orgs","repos_url":"https://api.github.com/users/nyaxt/repos","events_url":"https://api.github.com/users/nyaxt/events{/privacy}","received_events_url":"https://api.github.com/users/nyaxt/received_events","type":"User","site_admin":false},"repo":{"id":117749744,"name":"webpackage","full_name":"nyaxt/webpackage","owner":{"login":"nyaxt","id":18355,"avatar_url":"https://avatars2.githubusercontent.com/u/18355?v=4","gravatar_id":"","url":"https://api.github.com/users/nyaxt","html_url":"https://github.com/nyaxt","followers_url":"https://api.github.com/users/nyaxt/followers","following_url":"https://api.github.com/users/nyaxt/following{/other_user}","gists_url":"https://api.github.com/users/nyaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaxt/subscriptions","organizations_url":"https://api.github.com/users/nyaxt/orgs","repos_url":"https://api.github.com/users/nyaxt/repos","events_url":"https://api.github.com/users/nyaxt/events{/privacy}","received_events_url":"https://api.github.com/users/nyaxt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nyaxt/webpackage","description":"Web packaging format","fork":true,"url":"https://api.github.com/repos/nyaxt/webpackage","forks_url":"https://api.github.com/repos/nyaxt/webpackage/forks","keys_url":"https://api.github.com/repos/nyaxt/webpackage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyaxt/webpackage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyaxt/webpackage/teams","hooks_url":"https://api.github.com/repos/nyaxt/webpackage/hooks","issue_events_url":"https://api.github.com/repos/nyaxt/webpackage/issues/events{/number}","events_url":"https://api.github.com/repos/nyaxt/webpackage/events","assignees_url":"https://api.github.com/repos/nyaxt/webpackage/assignees{/user}","branches_url":"https://api.github.com/repos/nyaxt/webpackage/branches{/branch}","tags_url":"https://api.github.com/repos/nyaxt/webpackage/tags","blobs_url":"https://api.github.com/repos/nyaxt/webpackage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyaxt/webpackage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyaxt/webpackage/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyaxt/webpackage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyaxt/webpackage/statuses/{sha}","languages_url":"https://api.github.com/repos/nyaxt/webpackage/languages","stargazers_url":"https://api.github.com/repos/nyaxt/webpackage/stargazers","contributors_url":"https://api.github.com/repos/nyaxt/webpackage/contributors","subscribers_url":"https://api.github.com/repos/nyaxt/webpackage/subscribers","subscription_url":"https://api.github.com/repos/nyaxt/webpackage/subscription","commits_url":"https://api.github.com/repos/nyaxt/webpackage/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyaxt/webpackage/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyaxt/webpackage/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyaxt/webpackage/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyaxt/webpackage/contents/{+path}","compare_url":"https://api.github.com/repos/nyaxt/webpackage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyaxt/webpackage/merges","archive_url":"https://api.github.com/repos/nyaxt/webpackage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyaxt/webpackage/downloads","issues_url":"https://api.github.com/repos/nyaxt/webpackage/issues{/number}","pulls_url":"https://api.github.com/repos/nyaxt/webpackage/pulls{/number}","milestones_url":"https://api.github.com/repos/nyaxt/webpackage/milestones{/number}","notifications_url":"https://api.github.com/repos/nyaxt/webpackage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyaxt/webpackage/labels{/name}","releases_url":"https://api.github.com/repos/nyaxt/webpackage/releases{/id}","deployments_url":"https://api.github.com/repos/nyaxt/webpackage/deployments","created_at":"2018-01-16T22:21:12Z","updated_at":"2018-03-30T03:59:34Z","pushed_at":"2018-04-10T00:58:29Z","git_url":"git://github.com/nyaxt/webpackage.git","ssh_url":"git@github.com:nyaxt/webpackage.git","clone_url":"https://github.com/nyaxt/webpackage.git","svn_url":"https://github.com/nyaxt/webpackage","homepage":null,"size":3004,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"nyaxt:master","ref":"master","sha":"084d7f6227d98c644a4fd6ed499d6d657fc63952","user":{"login":"nyaxt","id":18355,"avatar_url":"https://avatars2.githubusercontent.com/u/18355?v=4","gravatar_id":"","url":"https://api.github.com/users/nyaxt","html_url":"https://github.com/nyaxt","followers_url":"https://api.github.com/users/nyaxt/followers","following_url":"https://api.github.com/users/nyaxt/following{/other_user}","gists_url":"https://api.github.com/users/nyaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaxt/subscriptions","organizations_url":"https://api.github.com/users/nyaxt/orgs","repos_url":"https://api.github.com/users/nyaxt/repos","events_url":"https://api.github.com/users/nyaxt/events{/privacy}","received_events_url":"https://api.github.com/users/nyaxt/received_events","type":"User","site_admin":false},"repo":{"id":117749744,"name":"webpackage","full_name":"nyaxt/webpackage","owner":{"login":"nyaxt","id":18355,"avatar_url":"https://avatars2.githubusercontent.com/u/18355?v=4","gravatar_id":"","url":"https://api.github.com/users/nyaxt","html_url":"https://github.com/nyaxt","followers_url":"https://api.github.com/users/nyaxt/followers","following_url":"https://api.github.com/users/nyaxt/following{/other_user}","gists_url":"https://api.github.com/users/nyaxt/gists{/gist_id}","starred_url":"https://api.github.com/users/nyaxt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyaxt/subscriptions","organizations_url":"https://api.github.com/users/nyaxt/orgs","repos_url":"https://api.github.com/users/nyaxt/repos","events_url":"https://api.github.com/users/nyaxt/events{/privacy}","received_events_url":"https://api.github.com/users/nyaxt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nyaxt/webpackage","description":"Web packaging format","fork":true,"url":"https://api.github.com/repos/nyaxt/webpackage","forks_url":"https://api.github.com/repos/nyaxt/webpackage/forks","keys_url":"https://api.github.com/repos/nyaxt/webpackage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyaxt/webpackage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyaxt/webpackage/teams","hooks_url":"https://api.github.com/repos/nyaxt/webpackage/hooks","issue_events_url":"https://api.github.com/repos/nyaxt/webpackage/issues/events{/number}","events_url":"https://api.github.com/repos/nyaxt/webpackage/events","assignees_url":"https://api.github.com/repos/nyaxt/webpackage/assignees{/user}","branches_url":"https://api.github.com/repos/nyaxt/webpackage/branches{/branch}","tags_url":"https://api.github.com/repos/nyaxt/webpackage/tags","blobs_url":"https://api.github.com/repos/nyaxt/webpackage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyaxt/webpackage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyaxt/webpackage/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyaxt/webpackage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyaxt/webpackage/statuses/{sha}","languages_url":"https://api.github.com/repos/nyaxt/webpackage/languages","stargazers_url":"https://api.github.com/repos/nyaxt/webpackage/stargazers","contributors_url":"https://api.github.com/repos/nyaxt/webpackage/contributors","subscribers_url":"https://api.github.com/repos/nyaxt/webpackage/subscribers","subscription_url":"https://api.github.com/repos/nyaxt/webpackage/subscription","commits_url":"https://api.github.com/repos/nyaxt/webpackage/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyaxt/webpackage/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyaxt/webpackage/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyaxt/webpackage/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyaxt/webpackage/contents/{+path}","compare_url":"https://api.github.com/repos/nyaxt/webpackage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyaxt/webpackage/merges","archive_url":"https://api.github.com/repos/nyaxt/webpackage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyaxt/webpackage/downloads","issues_url":"https://api.github.com/repos/nyaxt/webpackage/issues{/number}","pulls_url":"https://api.github.com/repos/nyaxt/webpackage/pulls{/number}","milestones_url":"https://api.github.com/repos/nyaxt/webpackage/milestones{/number}","notifications_url":"https://api.github.com/repos/nyaxt/webpackage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyaxt/webpackage/labels{/name}","releases_url":"https://api.github.com/repos/nyaxt/webpackage/releases{/id}","deployments_url":"https://api.github.com/repos/nyaxt/webpackage/deployments","created_at":"2018-01-16T22:21:12Z","updated_at":"2018-03-30T03:59:34Z","pushed_at":"2018-04-10T00:58:29Z","git_url":"git://github.com/nyaxt/webpackage.git","ssh_url":"git@github.com:nyaxt/webpackage.git","clone_url":"https://github.com/nyaxt/webpackage.git","svn_url":"https://github.com/nyaxt/webpackage","homepage":null,"size":3004,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":4,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/13"},"html":{"href":"https://github.com/nyaxt/webpackage/pull/13"},"issue":{"href":"https://api.github.com/repos/nyaxt/webpackage/issues/13"},"comments":{"href":"https://api.github.com/repos/nyaxt/webpackage/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nyaxt/webpackage/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/nyaxt/webpackage/statuses/69120a743f4a5e52fc8ce33e9c9fcebef650a45b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"hajimehoshi"}}