{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/154798155","pull_request_review_id":81015826,"id":154798155,"diff_hunk":"@@ -577,16 +559,19 @@ function* startLoginSaga() {\n   }\n }\n \n-function* reloginSaga({payload: {usernameOrEmail, passphrase}}: LoginGen.ReloginPayload) {\n-  yield Saga.put(LoginGen.createSetRevokedSelf({revoked: ''}))\n-  yield Saga.put(LoginGen.createSetDeletedSelf({deletedUsername: ''}))\n-\n-  yield Saga.call(initalizeMyCodeStateForLogin)\n-  yield Saga.call(loginFlowSaga, usernameOrEmail, passphrase)\n+function _relogin({payload: {usernameOrEmail, passphrase}}: LoginGen.ReloginPayload) {\n+  return Saga.all([\n+    Saga.put(LoginGen.createSetRevokedSelf({revoked: ''})),\n+    Saga.put(LoginGen.createSetDeletedSelf({deletedUsername: ''})),\n+    Saga.call(initalizeMyCodeStateForLogin),\n+    Saga.call(loginFlowSaga, usernameOrEmail, passphrase),","path":"shared/actions/login.js","position":117,"original_position":117,"commit_id":"cf115ba5b177c2591d266470aff8261d0bd85392","original_commit_id":"cf115ba5b177c2591d266470aff8261d0bd85392","user":{"login":"MarcoPolo","id":594035,"avatar_url":"https://avatars0.githubusercontent.com/u/594035?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoPolo","html_url":"https://github.com/MarcoPolo","followers_url":"https://api.github.com/users/MarcoPolo/followers","following_url":"https://api.github.com/users/MarcoPolo/following{/other_user}","gists_url":"https://api.github.com/users/MarcoPolo/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoPolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoPolo/subscriptions","organizations_url":"https://api.github.com/users/MarcoPolo/orgs","repos_url":"https://api.github.com/users/MarcoPolo/repos","events_url":"https://api.github.com/users/MarcoPolo/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoPolo/received_events","type":"User","site_admin":false},"body":"Is this semantically the same? the old code initialized first, then called loginFlowSaga.\r\n\r\nMaybe we should add another util `Saga.sequentially` easy way to implement it could be:\r\n\r\n```\r\n// In util/saga\r\nfunction *sequentially(effects: Array<Effects>) {\r\n  let results = []\r\n  for (let i = 0; i < effects.length; i++) {\r\n    results.push(yield effects[i])\r\n  }\r\n  return results\r\n}\r\n```\r\nUsage:\r\n```\r\nSaga.call(Saga.sequentially, [Saga.call(initalizeMyCodeStateForLogin), Saga.call(loginFlowSaga, usernameOrEmail, passphrase)])\r\n```","created_at":"2017-12-04T22:43:35Z","updated_at":"2017-12-04T22:46:03Z","html_url":"https://github.com/keybase/client/pull/9755#discussion_r154798155","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/9755","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/154798155"},"html":{"href":"https://github.com/keybase/client/pull/9755#discussion_r154798155"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/9755"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/9755","id":156036529,"html_url":"https://github.com/keybase/client/pull/9755","diff_url":"https://github.com/keybase/client/pull/9755.diff","patch_url":"https://github.com/keybase/client/pull/9755.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/9755","number":9755,"state":"open","locked":false,"title":"Login: immutable + sagas","user":{"login":"chrisnojima","id":516435,"avatar_url":"https://avatars2.githubusercontent.com/u/516435?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisnojima","html_url":"https://github.com/chrisnojima","followers_url":"https://api.github.com/users/chrisnojima/followers","following_url":"https://api.github.com/users/chrisnojima/following{/other_user}","gists_url":"https://api.github.com/users/chrisnojima/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisnojima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisnojima/subscriptions","organizations_url":"https://api.github.com/users/chrisnojima/orgs","repos_url":"https://api.github.com/users/chrisnojima/repos","events_url":"https://api.github.com/users/chrisnojima/events{/privacy}","received_events_url":"https://api.github.com/users/chrisnojima/received_events","type":"User","site_admin":false},"body":"This brings immutable and sagas to the login flow","created_at":"2017-12-02T23:19:18Z","updated_at":"2017-12-04T22:46:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f12b3a31c53cae43b4b17995faa64f65c4940b07","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/9755/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/9755/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/9755/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/cf115ba5b177c2591d266470aff8261d0bd85392","head":{"label":"keybase:nojima/DESKTOP-login-immutable","ref":"nojima/DESKTOP-login-immutable","sha":"cf115ba5b177c2591d266470aff8261d0bd85392","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2017-12-04T06:12:59Z","pushed_at":"2017-12-04T22:33:49Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":213162,"stargazers_count":2927,"watchers_count":2927,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":262,"mirror_url":null,"archived":false,"open_issues_count":1684,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":262,"open_issues":1684,"watchers":2927,"default_branch":"master"}},"base":{"label":"keybase:nojima/DESKTOP-more-immutable","ref":"nojima/DESKTOP-more-immutable","sha":"54c7eae340d1058352ad61624edb4e93de3ebf54","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2017-12-04T06:12:59Z","pushed_at":"2017-12-04T22:33:49Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":213162,"stargazers_count":2927,"watchers_count":2927,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":262,"mirror_url":null,"archived":false,"open_issues_count":1684,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":262,"open_issues":1684,"watchers":2927,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/9755"},"html":{"href":"https://github.com/keybase/client/pull/9755"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/9755"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/9755/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/9755/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/9755/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/cf115ba5b177c2591d266470aff8261d0bd85392"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MarcoPolo"}}