{"action":"created","comment":{"url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/comments/191972757","pull_request_review_id":124651642,"id":191972757,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MTk3Mjc1Nw==","diff_hunk":"@@ -27,30 +27,30 @@ const rl = readline.createInterface({\n   output: process.stdout\n })\n \n-const previousInputs = ['しりとり']\n-console.log(previousInputs[0])\n+const chain = ['しりとり']\n+console.log(chain[0])\n rl.prompt()\n shiritori.loaded.then(() => {\n-  rl.on('line', (input) => {\n-    shiritori.interact(kana => Promise.resolve(\n-        corpus[kana]), input, previousInputs, {\n-          win (word, kana) {\n-            if (word) {\n-              console.log(`${word} [${kana}]`)\n-            } else {\n-              console.log('すごい！')\n-            }\n+  rl.on('line', input => {\n+    shiritori\n+        .interact(\n+            kana => Promise.resolve(corpus[kana]),\n+            input,\n+            chain,\n+        )\n+        .then(result => {\n+          console.log(`${result.word} [${result.kana}]`)\n+          chain.unshift(input)\n+          chain.unshift(result.word)","path":"functions/shiritori/main.js","position":29,"original_position":29,"commit_id":"23fef604c4c55a7c3aed1038ce20b34f77274b27","original_commit_id":"23fef604c4c55a7c3aed1038ce20b34f77274b27","user":{"login":"proppy","id":5268,"node_id":"MDQ6VXNlcjUyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/5268?v=4","gravatar_id":"","url":"https://api.github.com/users/proppy","html_url":"https://github.com/proppy","followers_url":"https://api.github.com/users/proppy/followers","following_url":"https://api.github.com/users/proppy/following{/other_user}","gists_url":"https://api.github.com/users/proppy/gists{/gist_id}","starred_url":"https://api.github.com/users/proppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proppy/subscriptions","organizations_url":"https://api.github.com/users/proppy/orgs","repos_url":"https://api.github.com/users/proppy/repos","events_url":"https://api.github.com/users/proppy/events{/privacy}","received_events_url":"https://api.github.com/users/proppy/received_events","type":"User","site_admin":false},"body":"this should be `result.kana`","created_at":"2018-05-31T02:13:12Z","updated_at":"2018-05-31T02:13:12Z","html_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12#discussion_r191972757","pull_request_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/comments/191972757"},"html":{"href":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12#discussion_r191972757"},"pull_request":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12","id":191626234,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjI2MjM0","html_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12","diff_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12.diff","patch_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12.patch","issue_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/12","number":12,"state":"open","locked":false,"title":"shiritori: switch interact to promise","user":{"login":"proppy","id":5268,"node_id":"MDQ6VXNlcjUyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/5268?v=4","gravatar_id":"","url":"https://api.github.com/users/proppy","html_url":"https://github.com/proppy","followers_url":"https://api.github.com/users/proppy/followers","following_url":"https://api.github.com/users/proppy/following{/other_user}","gists_url":"https://api.github.com/users/proppy/gists{/gist_id}","starred_url":"https://api.github.com/users/proppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proppy/subscriptions","organizations_url":"https://api.github.com/users/proppy/orgs","repos_url":"https://api.github.com/users/proppy/repos","events_url":"https://api.github.com/users/proppy/events{/privacy}","received_events_url":"https://api.github.com/users/proppy/received_events","type":"User","site_admin":false},"body":"Fixes #9 ","created_at":"2018-05-31T02:12:41Z","updated_at":"2018-05-31T02:13:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48395eaf0c8e12fc066ae1915b479e0b23a34447","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12/commits","review_comments_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12/comments","review_comment_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/12/comments","statuses_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/statuses/23fef604c4c55a7c3aed1038ce20b34f77274b27","head":{"label":"proppy:promise","ref":"promise","sha":"23fef604c4c55a7c3aed1038ce20b34f77274b27","user":{"login":"proppy","id":5268,"node_id":"MDQ6VXNlcjUyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/5268?v=4","gravatar_id":"","url":"https://api.github.com/users/proppy","html_url":"https://github.com/proppy","followers_url":"https://api.github.com/users/proppy/followers","following_url":"https://api.github.com/users/proppy/following{/other_user}","gists_url":"https://api.github.com/users/proppy/gists{/gist_id}","starred_url":"https://api.github.com/users/proppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proppy/subscriptions","organizations_url":"https://api.github.com/users/proppy/orgs","repos_url":"https://api.github.com/users/proppy/repos","events_url":"https://api.github.com/users/proppy/events{/privacy}","received_events_url":"https://api.github.com/users/proppy/received_events","type":"User","site_admin":false},"repo":{"id":135516627,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU1MTY2Mjc=","name":"actionssdk-shiritori-ja-nodejs","full_name":"proppy/actionssdk-shiritori-ja-nodejs","owner":{"login":"proppy","id":5268,"node_id":"MDQ6VXNlcjUyNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/5268?v=4","gravatar_id":"","url":"https://api.github.com/users/proppy","html_url":"https://github.com/proppy","followers_url":"https://api.github.com/users/proppy/followers","following_url":"https://api.github.com/users/proppy/following{/other_user}","gists_url":"https://api.github.com/users/proppy/gists{/gist_id}","starred_url":"https://api.github.com/users/proppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proppy/subscriptions","organizations_url":"https://api.github.com/users/proppy/orgs","repos_url":"https://api.github.com/users/proppy/repos","events_url":"https://api.github.com/users/proppy/events{/privacy}","received_events_url":"https://api.github.com/users/proppy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/proppy/actionssdk-shiritori-ja-nodejs","description":null,"fork":true,"url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs","forks_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/forks","keys_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/teams","hooks_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/hooks","issue_events_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/events","assignees_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/tags","blobs_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/languages","stargazers_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/stargazers","contributors_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/contributors","subscribers_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/subscribers","subscription_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/subscription","commits_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/merges","archive_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/downloads","issues_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/proppy/actionssdk-shiritori-ja-nodejs/deployments","created_at":"2018-05-31T01:41:45Z","updated_at":"2018-05-31T01:41:47Z","pushed_at":"2018-05-31T02:11:57Z","git_url":"git://github.com/proppy/actionssdk-shiritori-ja-nodejs.git","ssh_url":"git@github.com:proppy/actionssdk-shiritori-ja-nodejs.git","clone_url":"https://github.com/proppy/actionssdk-shiritori-ja-nodejs.git","svn_url":"https://github.com/proppy/actionssdk-shiritori-ja-nodejs","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"actions-on-google:master","ref":"master","sha":"75a124b9a715e445b7ab159de44b0bab8a67a56e","user":{"login":"actions-on-google","id":23533486,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTMzNDg2","avatar_url":"https://avatars2.githubusercontent.com/u/23533486?v=4","gravatar_id":"","url":"https://api.github.com/users/actions-on-google","html_url":"https://github.com/actions-on-google","followers_url":"https://api.github.com/users/actions-on-google/followers","following_url":"https://api.github.com/users/actions-on-google/following{/other_user}","gists_url":"https://api.github.com/users/actions-on-google/gists{/gist_id}","starred_url":"https://api.github.com/users/actions-on-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/actions-on-google/subscriptions","organizations_url":"https://api.github.com/users/actions-on-google/orgs","repos_url":"https://api.github.com/users/actions-on-google/repos","events_url":"https://api.github.com/users/actions-on-google/events{/privacy}","received_events_url":"https://api.github.com/users/actions-on-google/received_events","type":"Organization","site_admin":false},"repo":{"id":135366750,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzNjY3NTA=","name":"actionssdk-shiritori-ja-nodejs","full_name":"actions-on-google/actionssdk-shiritori-ja-nodejs","owner":{"login":"actions-on-google","id":23533486,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTMzNDg2","avatar_url":"https://avatars2.githubusercontent.com/u/23533486?v=4","gravatar_id":"","url":"https://api.github.com/users/actions-on-google","html_url":"https://github.com/actions-on-google","followers_url":"https://api.github.com/users/actions-on-google/followers","following_url":"https://api.github.com/users/actions-on-google/following{/other_user}","gists_url":"https://api.github.com/users/actions-on-google/gists{/gist_id}","starred_url":"https://api.github.com/users/actions-on-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/actions-on-google/subscriptions","organizations_url":"https://api.github.com/users/actions-on-google/orgs","repos_url":"https://api.github.com/users/actions-on-google/repos","events_url":"https://api.github.com/users/actions-on-google/events{/privacy}","received_events_url":"https://api.github.com/users/actions-on-google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs","description":null,"fork":false,"url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs","forks_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/forks","keys_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/teams","hooks_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/hooks","issue_events_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/events","assignees_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/tags","blobs_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/languages","stargazers_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/stargazers","contributors_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/contributors","subscribers_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/subscribers","subscription_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/subscription","commits_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/merges","archive_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/downloads","issues_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/deployments","created_at":"2018-05-30T00:26:10Z","updated_at":"2018-05-31T01:28:49Z","pushed_at":"2018-05-31T02:12:42Z","git_url":"git://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs.git","ssh_url":"git@github.com:actions-on-google/actionssdk-shiritori-ja-nodejs.git","clone_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs.git","svn_url":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":12,"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":2,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12"},"html":{"href":"https://github.com/actions-on-google/actionssdk-shiritori-ja-nodejs/pull/12"},"issue":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/12"},"comments":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/actions-on-google/actionssdk-shiritori-ja-nodejs/statuses/23fef604c4c55a7c3aed1038ce20b34f77274b27"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"proppy"}}