{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/comments/241614578","pull_request_review_id":184933114,"id":241614578,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTYxNDU3OA==","diff_hunk":"@@ -0,0 +1,67 @@\n+#!/usr/bin/env node\n+/* eslint-env jest */\n+\n+const fs = require('fs')\n+const {promisify} = require('util')\n+const Bot = require('../index.js')","path":"__tests__/shutdown.test.js","position":6,"original_position":6,"commit_id":"2fb55acd87a6958b03690604728bcb24f62a3924","original_commit_id":"2fb55acd87a6958b03690604728bcb24f62a3924","user":{"login":"nathunsmitty","id":5677971,"node_id":"MDQ6VXNlcjU2Nzc5NzE=","avatar_url":"https://avatars1.githubusercontent.com/u/5677971?v=4","gravatar_id":"","url":"https://api.github.com/users/nathunsmitty","html_url":"https://github.com/nathunsmitty","followers_url":"https://api.github.com/users/nathunsmitty/followers","following_url":"https://api.github.com/users/nathunsmitty/following{/other_user}","gists_url":"https://api.github.com/users/nathunsmitty/gists{/gist_id}","starred_url":"https://api.github.com/users/nathunsmitty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathunsmitty/subscriptions","organizations_url":"https://api.github.com/users/nathunsmitty/orgs","repos_url":"https://api.github.com/users/nathunsmitty/repos","events_url":"https://api.github.com/users/nathunsmitty/events{/privacy}","received_events_url":"https://api.github.com/users/nathunsmitty/received_events","type":"User","site_admin":false},"body":"I think we should import `Bot` from `lib` instead of the transpiled `index.js`. Jest code is already going through babel, so it doesn't make a lot of sense to do this twice and require us to run `yarn build` before we can `yarn test`.\r\n\r\nAlso since the jest code is compiled by babel, we can use es6 imports instead of node's `require` syntax!","created_at":"2018-12-14T00:53:47Z","updated_at":"2018-12-14T00:54:14Z","html_url":"https://github.com/keybase/keybase-chat-bot/pull/71#discussion_r241614578","pull_request_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/comments/241614578"},"html":{"href":"https://github.com/keybase/keybase-chat-bot/pull/71#discussion_r241614578"},"pull_request":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71","id":238551566,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4NTUxNTY2","html_url":"https://github.com/keybase/keybase-chat-bot/pull/71","diff_url":"https://github.com/keybase/keybase-chat-bot/pull/71.diff","patch_url":"https://github.com/keybase/keybase-chat-bot/pull/71.patch","issue_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/71","number":71,"state":"open","locked":false,"title":"Coyne/issue 64","user":{"login":"malgorithms","id":614943,"node_id":"MDQ6VXNlcjYxNDk0Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/614943?v=4","gravatar_id":"","url":"https://api.github.com/users/malgorithms","html_url":"https://github.com/malgorithms","followers_url":"https://api.github.com/users/malgorithms/followers","following_url":"https://api.github.com/users/malgorithms/following{/other_user}","gists_url":"https://api.github.com/users/malgorithms/gists{/gist_id}","starred_url":"https://api.github.com/users/malgorithms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malgorithms/subscriptions","organizations_url":"https://api.github.com/users/malgorithms/orgs","repos_url":"https://api.github.com/users/malgorithms/repos","events_url":"https://api.github.com/users/malgorithms/events{/privacy}","received_events_url":"https://api.github.com/users/malgorithms/received_events","type":"User","site_admin":false},"body":"@nathunsmitty @thebearjew , finally have a `deinit` that seems 100% effective. it cleans up the directory and also kills any listen processes.\r\n\r\nThere's a good test which looks at running processes and the homeDir to make sure that after init and 2 `watch...` calls there is a good directory, and 3 running processes (1 service, 2 listeners) and after deinit makes sure the dir is missing and there are no such processes anymore. \r\n\r\nThere's a todo item mentioned in the code which I'll make a separate ticket for, but this seems to be in good shape.","created_at":"2018-12-13T22:21:39Z","updated_at":"2018-12-14T00:54:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35bf28051a12a1571b91c37c62c1c9e4139ad849","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71/commits","review_comments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71/comments","review_comment_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/71/comments","statuses_url":"https://api.github.com/repos/keybase/keybase-chat-bot/statuses/2fb55acd87a6958b03690604728bcb24f62a3924","head":{"label":"keybase:coyne/issue-64","ref":"coyne/issue-64","sha":"2fb55acd87a6958b03690604728bcb24f62a3924","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","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":74394434,"node_id":"MDEwOlJlcG9zaXRvcnk3NDM5NDQzNA==","name":"keybase-chat-bot","full_name":"keybase/keybase-chat-bot","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","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},"html_url":"https://github.com/keybase/keybase-chat-bot","description":"exploration with the keybase chat API","fork":false,"url":"https://api.github.com/repos/keybase/keybase-chat-bot","forks_url":"https://api.github.com/repos/keybase/keybase-chat-bot/forks","keys_url":"https://api.github.com/repos/keybase/keybase-chat-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/keybase-chat-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/keybase-chat-bot/teams","hooks_url":"https://api.github.com/repos/keybase/keybase-chat-bot/hooks","issue_events_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/keybase-chat-bot/events","assignees_url":"https://api.github.com/repos/keybase/keybase-chat-bot/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/keybase-chat-bot/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/keybase-chat-bot/tags","blobs_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/keybase-chat-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/keybase-chat-bot/languages","stargazers_url":"https://api.github.com/repos/keybase/keybase-chat-bot/stargazers","contributors_url":"https://api.github.com/repos/keybase/keybase-chat-bot/contributors","subscribers_url":"https://api.github.com/repos/keybase/keybase-chat-bot/subscribers","subscription_url":"https://api.github.com/repos/keybase/keybase-chat-bot/subscription","commits_url":"https://api.github.com/repos/keybase/keybase-chat-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/keybase-chat-bot/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/keybase-chat-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/keybase-chat-bot/merges","archive_url":"https://api.github.com/repos/keybase/keybase-chat-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/keybase-chat-bot/downloads","issues_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/keybase-chat-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/keybase-chat-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/keybase-chat-bot/labels{/name}","releases_url":"https://api.github.com/repos/keybase/keybase-chat-bot/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/deployments","created_at":"2016-11-21T18:40:51Z","updated_at":"2018-12-13T15:14:11Z","pushed_at":"2018-12-13T23:24:31Z","git_url":"git://github.com/keybase/keybase-chat-bot.git","ssh_url":"git@github.com:keybase/keybase-chat-bot.git","clone_url":"https://github.com/keybase/keybase-chat-bot.git","svn_url":"https://github.com/keybase/keybase-chat-bot","homepage":null,"size":670,"stargazers_count":51,"watchers_count":51,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":20,"license":null,"forks":8,"open_issues":20,"watchers":51,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"0d09593d178fced27c5137389471c5fc5b279f7f","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","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":74394434,"node_id":"MDEwOlJlcG9zaXRvcnk3NDM5NDQzNA==","name":"keybase-chat-bot","full_name":"keybase/keybase-chat-bot","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","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},"html_url":"https://github.com/keybase/keybase-chat-bot","description":"exploration with the keybase chat API","fork":false,"url":"https://api.github.com/repos/keybase/keybase-chat-bot","forks_url":"https://api.github.com/repos/keybase/keybase-chat-bot/forks","keys_url":"https://api.github.com/repos/keybase/keybase-chat-bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/keybase-chat-bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/keybase-chat-bot/teams","hooks_url":"https://api.github.com/repos/keybase/keybase-chat-bot/hooks","issue_events_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/keybase-chat-bot/events","assignees_url":"https://api.github.com/repos/keybase/keybase-chat-bot/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/keybase-chat-bot/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/keybase-chat-bot/tags","blobs_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/keybase-chat-bot/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/keybase-chat-bot/languages","stargazers_url":"https://api.github.com/repos/keybase/keybase-chat-bot/stargazers","contributors_url":"https://api.github.com/repos/keybase/keybase-chat-bot/contributors","subscribers_url":"https://api.github.com/repos/keybase/keybase-chat-bot/subscribers","subscription_url":"https://api.github.com/repos/keybase/keybase-chat-bot/subscription","commits_url":"https://api.github.com/repos/keybase/keybase-chat-bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/keybase-chat-bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/keybase-chat-bot/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/keybase-chat-bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/keybase-chat-bot/merges","archive_url":"https://api.github.com/repos/keybase/keybase-chat-bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/keybase-chat-bot/downloads","issues_url":"https://api.github.com/repos/keybase/keybase-chat-bot/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/keybase-chat-bot/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/keybase-chat-bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/keybase-chat-bot/labels{/name}","releases_url":"https://api.github.com/repos/keybase/keybase-chat-bot/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/keybase-chat-bot/deployments","created_at":"2016-11-21T18:40:51Z","updated_at":"2018-12-13T15:14:11Z","pushed_at":"2018-12-13T23:24:31Z","git_url":"git://github.com/keybase/keybase-chat-bot.git","ssh_url":"git@github.com:keybase/keybase-chat-bot.git","clone_url":"https://github.com/keybase/keybase-chat-bot.git","svn_url":"https://github.com/keybase/keybase-chat-bot","homepage":null,"size":670,"stargazers_count":51,"watchers_count":51,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":20,"license":null,"forks":8,"open_issues":20,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71"},"html":{"href":"https://github.com/keybase/keybase-chat-bot/pull/71"},"issue":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/71"},"comments":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/keybase-chat-bot/statuses/2fb55acd87a6958b03690604728bcb24f62a3924"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nathunsmitty"}}