{"action":"created","issue":{"url":"https://api.github.com/repos/masutaka/github-nippou/issues/74","repository_url":"https://api.github.com/repos/masutaka/github-nippou","labels_url":"https://api.github.com/repos/masutaka/github-nippou/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/masutaka/github-nippou/issues/74/comments","events_url":"https://api.github.com/repos/masutaka/github-nippou/issues/74/events","html_url":"https://github.com/masutaka/github-nippou/pull/74","id":310807102,"number":74,"title":"Use event's Issue/PullRequest when user doesn't have permission to the repositories","user":{"login":"yono","id":149772,"avatar_url":"https://avatars0.githubusercontent.com/u/149772?v=4","gravatar_id":"","url":"https://api.github.com/users/yono","html_url":"https://github.com/yono","followers_url":"https://api.github.com/users/yono/followers","following_url":"https://api.github.com/users/yono/following{/other_user}","gists_url":"https://api.github.com/users/yono/gists{/gist_id}","starred_url":"https://api.github.com/users/yono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yono/subscriptions","organizations_url":"https://api.github.com/users/yono/orgs","repos_url":"https://api.github.com/users/yono/repos","events_url":"https://api.github.com/users/yono/events{/privacy}","received_events_url":"https://api.github.com/users/yono/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-03T12:00:46Z","updated_at":"2018-04-16T03:59:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/masutaka/github-nippou/pulls/74","html_url":"https://github.com/masutaka/github-nippou/pull/74","diff_url":"https://github.com/masutaka/github-nippou/pull/74.diff","patch_url":"https://github.com/masutaka/github-nippou/pull/74.patch"},"body":"## 概要\r\n\r\n現時点でアクセス権が無いレポジトリの Issue, PR が action に含まれる場合のエラーを回避する修正です。\r\n\r\n## 詳細\r\n\r\n現時点でアクセス権が無いレポジトリの Issue, PR が action に含まれる場合、以下のように runtime error になります。\r\n\r\n```shell\r\n$ github-nippou -s 20180314 -u 20180314\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0xb8 pc=0x1346018]\r\n\r\ngoroutine 53 [running]:\r\ngithub.com/masutaka/github-nippou/lib.(*Format).Line(0xc4204e0f80, 0xc4202fdd40, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/Users/masutaka/src/github.com/masutaka/github-nippou/lib/format.go:73 +0x8d8\r\ngithub.com/masutaka/github-nippou/lib.List.func1(0xc42017d620, 0xc4204bce10, 0xc4204e0f80, 0xc42017d618, 0xc4204e10c0, 0xc4202fdd40, 0x3)\r\n\t/Users/masutaka/src/github.com/masutaka/github-nippou/lib/list.go:56 +0xa4\r\ncreated by github.com/masutaka/github-nippou/lib.List\r\n\t/Users/masutaka/src/github.com/masutaka/github-nippou/lib/list.go:53 +0x44c\r\n```\r\n\r\nそこで `getIssue`, `getPullRequest` で取得に失敗した場合は event が持つ `Issue`, `PullRequest` を代わりに使うようにしました。"},"comment":{"url":"https://api.github.com/repos/masutaka/github-nippou/issues/comments/381473765","html_url":"https://github.com/masutaka/github-nippou/pull/74#issuecomment-381473765","issue_url":"https://api.github.com/repos/masutaka/github-nippou/issues/74","id":381473765,"user":{"login":"yono","id":149772,"avatar_url":"https://avatars0.githubusercontent.com/u/149772?v=4","gravatar_id":"","url":"https://api.github.com/users/yono","html_url":"https://github.com/yono","followers_url":"https://api.github.com/users/yono/followers","following_url":"https://api.github.com/users/yono/following{/other_user}","gists_url":"https://api.github.com/users/yono/gists{/gist_id}","starred_url":"https://api.github.com/users/yono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yono/subscriptions","organizations_url":"https://api.github.com/users/yono/orgs","repos_url":"https://api.github.com/users/yono/repos","events_url":"https://api.github.com/users/yono/events{/privacy}","received_events_url":"https://api.github.com/users/yono/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T03:59:53Z","updated_at":"2018-04-16T03:59:53Z","author_association":"NONE","body":"ありがとうございます。\r\n私も https://github.com/masutaka/github-nippou/pull/75 を手元に持ってきて使っていますが、今のところは問題なく動いています。"}}
{"actor":{"display_login":"yono"}}