{"action":"created","comment":{"url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/comments/243027666","pull_request_review_id":186688317,"id":243027666,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzAyNzY2Ng==","diff_hunk":"@@ -753,7 +757,7 @@ sealed abstract class IO[+E, +A] extends Serializable { self =>\n    * Keep or break a promise based on the result of this action.\n    */\n   final def to[E1 >: E, A1 >: A](p: Promise[E1, A1]): IO[Nothing, Boolean] =\n-    self.run.flatMap(x => p.done(IO.done(x)))\n+    self.redeem0(cause => p.done(IO.fail0(cause)), p.complete).onInterrupt(p.interrupt)","path":"core/shared/src/main/scala/scalaz/zio/IO.scala","position":27,"original_position":27,"commit_id":"c1b0d7c04c1f88b50c205910f7dbbf599c5957d5","original_commit_id":"c1b0d7c04c1f88b50c205910f7dbbf599c5957d5","user":{"login":"kaishh","id":450507,"node_id":"MDQ6VXNlcjQ1MDUwNw==","avatar_url":"https://avatars1.githubusercontent.com/u/450507?v=4","gravatar_id":"","url":"https://api.github.com/users/kaishh","html_url":"https://github.com/kaishh","followers_url":"https://api.github.com/users/kaishh/followers","following_url":"https://api.github.com/users/kaishh/following{/other_user}","gists_url":"https://api.github.com/users/kaishh/gists{/gist_id}","starred_url":"https://api.github.com/users/kaishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaishh/subscriptions","organizations_url":"https://api.github.com/users/kaishh/orgs","repos_url":"https://api.github.com/users/kaishh/repos","events_url":"https://api.github.com/users/kaishh/events{/privacy}","received_events_url":"https://api.github.com/users/kaishh/received_events","type":"User","site_admin":false},"body":"Don't we need to leave .onInterrupt to still complete the promise in case of outer interruption?","created_at":"2018-12-19T18:32:36Z","updated_at":"2018-12-19T18:32:36Z","html_url":"https://github.com/scalaz/scalaz-zio/pull/462#discussion_r243027666","pull_request_url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/comments/243027666"},"html":{"href":"https://github.com/scalaz/scalaz-zio/pull/462#discussion_r243027666"},"pull_request":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462"}},"in_reply_to_id":242938241},"pull_request":{"url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462","id":238953167,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTUzMTY3","html_url":"https://github.com/scalaz/scalaz-zio/pull/462","diff_url":"https://github.com/scalaz/scalaz-zio/pull/462.diff","patch_url":"https://github.com/scalaz/scalaz-zio/pull/462.patch","issue_url":"https://api.github.com/repos/scalaz/scalaz-zio/issues/462","number":462,"state":"open","locked":false,"title":"Fix `IO#to`","user":{"login":"regiskuckaertz","id":629976,"node_id":"MDQ6VXNlcjYyOTk3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/629976?v=4","gravatar_id":"","url":"https://api.github.com/users/regiskuckaertz","html_url":"https://github.com/regiskuckaertz","followers_url":"https://api.github.com/users/regiskuckaertz/followers","following_url":"https://api.github.com/users/regiskuckaertz/following{/other_user}","gists_url":"https://api.github.com/users/regiskuckaertz/gists{/gist_id}","starred_url":"https://api.github.com/users/regiskuckaertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regiskuckaertz/subscriptions","organizations_url":"https://api.github.com/users/regiskuckaertz/orgs","repos_url":"https://api.github.com/users/regiskuckaertz/repos","events_url":"https://api.github.com/users/regiskuckaertz/events{/privacy}","received_events_url":"https://api.github.com/users/regiskuckaertz/received_events","type":"User","site_admin":false},"body":"Avoids allocation of an `ExitResult` and handles interruption.","created_at":"2018-12-16T08:32:58Z","updated_at":"2018-12-19T18:32:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbae3b89efac6fae1a22d2823c6d1ffa52b6fe9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462/commits","review_comments_url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462/comments","review_comment_url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scalaz/scalaz-zio/issues/462/comments","statuses_url":"https://api.github.com/repos/scalaz/scalaz-zio/statuses/c1b0d7c04c1f88b50c205910f7dbbf599c5957d5","head":{"label":"regiskuckaertz:rk-promise-to","ref":"rk-promise-to","sha":"c1b0d7c04c1f88b50c205910f7dbbf599c5957d5","user":{"login":"regiskuckaertz","id":629976,"node_id":"MDQ6VXNlcjYyOTk3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/629976?v=4","gravatar_id":"","url":"https://api.github.com/users/regiskuckaertz","html_url":"https://github.com/regiskuckaertz","followers_url":"https://api.github.com/users/regiskuckaertz/followers","following_url":"https://api.github.com/users/regiskuckaertz/following{/other_user}","gists_url":"https://api.github.com/users/regiskuckaertz/gists{/gist_id}","starred_url":"https://api.github.com/users/regiskuckaertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regiskuckaertz/subscriptions","organizations_url":"https://api.github.com/users/regiskuckaertz/orgs","repos_url":"https://api.github.com/users/regiskuckaertz/repos","events_url":"https://api.github.com/users/regiskuckaertz/events{/privacy}","received_events_url":"https://api.github.com/users/regiskuckaertz/received_events","type":"User","site_admin":false},"repo":{"id":136933794,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5MzM3OTQ=","name":"scalaz-zio","full_name":"regiskuckaertz/scalaz-zio","private":false,"owner":{"login":"regiskuckaertz","id":629976,"node_id":"MDQ6VXNlcjYyOTk3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/629976?v=4","gravatar_id":"","url":"https://api.github.com/users/regiskuckaertz","html_url":"https://github.com/regiskuckaertz","followers_url":"https://api.github.com/users/regiskuckaertz/followers","following_url":"https://api.github.com/users/regiskuckaertz/following{/other_user}","gists_url":"https://api.github.com/users/regiskuckaertz/gists{/gist_id}","starred_url":"https://api.github.com/users/regiskuckaertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regiskuckaertz/subscriptions","organizations_url":"https://api.github.com/users/regiskuckaertz/orgs","repos_url":"https://api.github.com/users/regiskuckaertz/repos","events_url":"https://api.github.com/users/regiskuckaertz/events{/privacy}","received_events_url":"https://api.github.com/users/regiskuckaertz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/regiskuckaertz/scalaz-zio","description":"ZIO — A principled, powerful, standalone effect data type for any Scala project.","fork":true,"url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio","forks_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/forks","keys_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/teams","hooks_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/hooks","issue_events_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/issues/events{/number}","events_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/events","assignees_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/assignees{/user}","branches_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/branches{/branch}","tags_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/tags","blobs_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/git/refs{/sha}","trees_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/statuses/{sha}","languages_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/languages","stargazers_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/stargazers","contributors_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/contributors","subscribers_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/subscribers","subscription_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/subscription","commits_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/commits{/sha}","git_commits_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/git/commits{/sha}","comments_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/comments{/number}","issue_comment_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/issues/comments{/number}","contents_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/contents/{+path}","compare_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/merges","archive_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/downloads","issues_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/issues{/number}","pulls_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/pulls{/number}","milestones_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/milestones{/number}","notifications_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/labels{/name}","releases_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/releases{/id}","deployments_url":"https://api.github.com/repos/regiskuckaertz/scalaz-zio/deployments","created_at":"2018-06-11T13:57:11Z","updated_at":"2018-12-16T08:26:50Z","pushed_at":"2018-12-18T09:40:43Z","git_url":"git://github.com/regiskuckaertz/scalaz-zio.git","ssh_url":"git@github.com:regiskuckaertz/scalaz-zio.git","clone_url":"https://github.com/regiskuckaertz/scalaz-zio.git","svn_url":"https://github.com/regiskuckaertz/scalaz-zio","homepage":"","size":53852,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scalaz:master","ref":"master","sha":"e4698b9ca33087f4cda441ff0779de8c7c998cbe","user":{"login":"scalaz","id":183416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzQxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/183416?v=4","gravatar_id":"","url":"https://api.github.com/users/scalaz","html_url":"https://github.com/scalaz","followers_url":"https://api.github.com/users/scalaz/followers","following_url":"https://api.github.com/users/scalaz/following{/other_user}","gists_url":"https://api.github.com/users/scalaz/gists{/gist_id}","starred_url":"https://api.github.com/users/scalaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalaz/subscriptions","organizations_url":"https://api.github.com/users/scalaz/orgs","repos_url":"https://api.github.com/users/scalaz/repos","events_url":"https://api.github.com/users/scalaz/events{/privacy}","received_events_url":"https://api.github.com/users/scalaz/received_events","type":"Organization","site_admin":false},"repo":{"id":134079884,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQwNzk4ODQ=","name":"scalaz-zio","full_name":"scalaz/scalaz-zio","private":false,"owner":{"login":"scalaz","id":183416,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzQxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/183416?v=4","gravatar_id":"","url":"https://api.github.com/users/scalaz","html_url":"https://github.com/scalaz","followers_url":"https://api.github.com/users/scalaz/followers","following_url":"https://api.github.com/users/scalaz/following{/other_user}","gists_url":"https://api.github.com/users/scalaz/gists{/gist_id}","starred_url":"https://api.github.com/users/scalaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalaz/subscriptions","organizations_url":"https://api.github.com/users/scalaz/orgs","repos_url":"https://api.github.com/users/scalaz/repos","events_url":"https://api.github.com/users/scalaz/events{/privacy}","received_events_url":"https://api.github.com/users/scalaz/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scalaz/scalaz-zio","description":"ZIO — A type-safe, composable library for asynchronous and concurrent programming in Scala","fork":false,"url":"https://api.github.com/repos/scalaz/scalaz-zio","forks_url":"https://api.github.com/repos/scalaz/scalaz-zio/forks","keys_url":"https://api.github.com/repos/scalaz/scalaz-zio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scalaz/scalaz-zio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scalaz/scalaz-zio/teams","hooks_url":"https://api.github.com/repos/scalaz/scalaz-zio/hooks","issue_events_url":"https://api.github.com/repos/scalaz/scalaz-zio/issues/events{/number}","events_url":"https://api.github.com/repos/scalaz/scalaz-zio/events","assignees_url":"https://api.github.com/repos/scalaz/scalaz-zio/assignees{/user}","branches_url":"https://api.github.com/repos/scalaz/scalaz-zio/branches{/branch}","tags_url":"https://api.github.com/repos/scalaz/scalaz-zio/tags","blobs_url":"https://api.github.com/repos/scalaz/scalaz-zio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scalaz/scalaz-zio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scalaz/scalaz-zio/git/refs{/sha}","trees_url":"https://api.github.com/repos/scalaz/scalaz-zio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scalaz/scalaz-zio/statuses/{sha}","languages_url":"https://api.github.com/repos/scalaz/scalaz-zio/languages","stargazers_url":"https://api.github.com/repos/scalaz/scalaz-zio/stargazers","contributors_url":"https://api.github.com/repos/scalaz/scalaz-zio/contributors","subscribers_url":"https://api.github.com/repos/scalaz/scalaz-zio/subscribers","subscription_url":"https://api.github.com/repos/scalaz/scalaz-zio/subscription","commits_url":"https://api.github.com/repos/scalaz/scalaz-zio/commits{/sha}","git_commits_url":"https://api.github.com/repos/scalaz/scalaz-zio/git/commits{/sha}","comments_url":"https://api.github.com/repos/scalaz/scalaz-zio/comments{/number}","issue_comment_url":"https://api.github.com/repos/scalaz/scalaz-zio/issues/comments{/number}","contents_url":"https://api.github.com/repos/scalaz/scalaz-zio/contents/{+path}","compare_url":"https://api.github.com/repos/scalaz/scalaz-zio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scalaz/scalaz-zio/merges","archive_url":"https://api.github.com/repos/scalaz/scalaz-zio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scalaz/scalaz-zio/downloads","issues_url":"https://api.github.com/repos/scalaz/scalaz-zio/issues{/number}","pulls_url":"https://api.github.com/repos/scalaz/scalaz-zio/pulls{/number}","milestones_url":"https://api.github.com/repos/scalaz/scalaz-zio/milestones{/number}","notifications_url":"https://api.github.com/repos/scalaz/scalaz-zio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scalaz/scalaz-zio/labels{/name}","releases_url":"https://api.github.com/repos/scalaz/scalaz-zio/releases{/id}","deployments_url":"https://api.github.com/repos/scalaz/scalaz-zio/deployments","created_at":"2018-05-19T16:40:37Z","updated_at":"2018-12-19T16:50:45Z","pushed_at":"2018-12-19T17:41:33Z","git_url":"git://github.com/scalaz/scalaz-zio.git","ssh_url":"git@github.com:scalaz/scalaz-zio.git","clone_url":"https://github.com/scalaz/scalaz-zio.git","svn_url":"https://github.com/scalaz/scalaz-zio","homepage":"https://scalaz.github.io/scalaz-zio/","size":55044,"stargazers_count":498,"watchers_count":498,"language":"Scala","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":137,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":137,"open_issues":69,"watchers":498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462"},"html":{"href":"https://github.com/scalaz/scalaz-zio/pull/462"},"issue":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/issues/462"},"comments":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/issues/462/comments"},"review_comments":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462/comments"},"review_comment":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/pulls/462/commits"},"statuses":{"href":"https://api.github.com/repos/scalaz/scalaz-zio/statuses/c1b0d7c04c1f88b50c205910f7dbbf599c5957d5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kaishh"}}