{"action":"created","comment":{"url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/comments/189470528","pull_request_review_id":121654981,"id":189470528,"diff_hunk":"@@ -0,0 +1,53 @@\n+const nest = require('depnest')\n+const { onceTrue } = require('mutant')\n+const path = require('path')\n+const fs = require('fs')\n+const os = require('os')\n+const config = require('../../config').create().config.sync.load()\n+const peersFile = path.join(config.path, \"gossip.json\")\n+const secretFile = path.join(config.path, \"secret\")\n+\n+\n+exports.gives = nest('backup.async.exportIdentity')\n+\n+\n+exports.needs = nest({\n+  'keys.sync.id': 'first',\n+  'sbot.obs.connection': 'first'\n+})\n+\n+exports.create = function (api) {\n+  return nest('backup.async.exportIdentity', (password, filename, cb) => {\n+    if (\"undefined\" == typeof filename) {\n+      cb()\n+    } else {\n+\n+      console.log(`should export identity to file ${filename}`)\n+\n+      let peers = JSON.parse(fs.readFileSync(peersFile))\n+      let secret = fs.readFileSync(secretFile, \"utf8\")\n+\n+      onceTrue(api.sbot.obs.connection, sbot => {\n+\n+        let feedId = api.keys.sync.id()\n+\n+        sbot.latestSequence(feedId, (err, sequence) => {\n+\n+          if (err) throw err\n+\n+          let data = {\n+            exportDate: new Date(),","path":"backup/async/exportIdentity.js","position":39,"original_position":39,"commit_id":"a712df77a26a0ced340c16b0f754794049f19fe2","original_commit_id":"a712df77a26a0ced340c16b0f754794049f19fe2","user":{"login":"mixmix","id":2665886,"avatar_url":"https://avatars1.githubusercontent.com/u/2665886?v=4","gravatar_id":"","url":"https://api.github.com/users/mixmix","html_url":"https://github.com/mixmix","followers_url":"https://api.github.com/users/mixmix/followers","following_url":"https://api.github.com/users/mixmix/following{/other_user}","gists_url":"https://api.github.com/users/mixmix/gists{/gist_id}","starred_url":"https://api.github.com/users/mixmix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixmix/subscriptions","organizations_url":"https://api.github.com/users/mixmix/orgs","repos_url":"https://api.github.com/users/mixmix/repos","events_url":"https://api.github.com/users/mixmix/events{/privacy}","received_events_url":"https://api.github.com/users/mixmix/received_events","type":"User","site_admin":false},"body":"we could export this to something more human readable which is still machine parseable. I recommend `toISOString()`","created_at":"2018-05-20T21:04:43Z","updated_at":"2018-05-20T21:04:50Z","html_url":"https://github.com/ticktackim/ticktack-workplan/pull/144#discussion_r189470528","pull_request_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/comments/189470528"},"html":{"href":"https://github.com/ticktackim/ticktack-workplan/pull/144#discussion_r189470528"},"pull_request":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144"}}},"pull_request":{"url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144","id":189250856,"html_url":"https://github.com/ticktackim/ticktack-workplan/pull/144","diff_url":"https://github.com/ticktackim/ticktack-workplan/pull/144.diff","patch_url":"https://github.com/ticktackim/ticktack-workplan/pull/144.patch","issue_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/144","number":144,"state":"open","locked":false,"title":"Feature keys export","user":{"login":"soapdog","id":23247,"avatar_url":"https://avatars0.githubusercontent.com/u/23247?v=4","gravatar_id":"","url":"https://api.github.com/users/soapdog","html_url":"https://github.com/soapdog","followers_url":"https://api.github.com/users/soapdog/followers","following_url":"https://api.github.com/users/soapdog/following{/other_user}","gists_url":"https://api.github.com/users/soapdog/gists{/gist_id}","starred_url":"https://api.github.com/users/soapdog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soapdog/subscriptions","organizations_url":"https://api.github.com/users/soapdog/orgs","repos_url":"https://api.github.com/users/soapdog/repos","events_url":"https://api.github.com/users/soapdog/events{/privacy}","received_events_url":"https://api.github.com/users/soapdog/received_events","type":"User","site_admin":false},"body":"This needs more testing before merge.\r\n\r\n@mixmix I'd like some feedback on how well the features work for you. Be aware that some code clean-up will be needed before we merge. This is not ready or final, but it is working. ","created_at":"2018-05-20T20:21:43Z","updated_at":"2018-05-20T21:04:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144/commits","review_comments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144/comments","review_comment_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/144/comments","statuses_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/statuses/a712df77a26a0ced340c16b0f754794049f19fe2","head":{"label":"ticktackim:feature-keys-export","ref":"feature-keys-export","sha":"a712df77a26a0ced340c16b0f754794049f19fe2","user":{"login":"ticktackim","id":30351648,"avatar_url":"https://avatars3.githubusercontent.com/u/30351648?v=4","gravatar_id":"","url":"https://api.github.com/users/ticktackim","html_url":"https://github.com/ticktackim","followers_url":"https://api.github.com/users/ticktackim/followers","following_url":"https://api.github.com/users/ticktackim/following{/other_user}","gists_url":"https://api.github.com/users/ticktackim/gists{/gist_id}","starred_url":"https://api.github.com/users/ticktackim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticktackim/subscriptions","organizations_url":"https://api.github.com/users/ticktackim/orgs","repos_url":"https://api.github.com/users/ticktackim/repos","events_url":"https://api.github.com/users/ticktackim/events{/privacy}","received_events_url":"https://api.github.com/users/ticktackim/received_events","type":"User","site_admin":false},"repo":{"id":99535018,"name":"ticktack-workplan","full_name":"ticktackim/ticktack-workplan","owner":{"login":"ticktackim","id":30351648,"avatar_url":"https://avatars3.githubusercontent.com/u/30351648?v=4","gravatar_id":"","url":"https://api.github.com/users/ticktackim","html_url":"https://github.com/ticktackim","followers_url":"https://api.github.com/users/ticktackim/followers","following_url":"https://api.github.com/users/ticktackim/following{/other_user}","gists_url":"https://api.github.com/users/ticktackim/gists{/gist_id}","starred_url":"https://api.github.com/users/ticktackim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticktackim/subscriptions","organizations_url":"https://api.github.com/users/ticktackim/orgs","repos_url":"https://api.github.com/users/ticktackim/repos","events_url":"https://api.github.com/users/ticktackim/events{/privacy}","received_events_url":"https://api.github.com/users/ticktackim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ticktackim/ticktack-workplan","description":"This is the main repo for continuous workplan. For official site, visit","fork":false,"url":"https://api.github.com/repos/ticktackim/ticktack-workplan","forks_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/forks","keys_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/teams","hooks_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/hooks","issue_events_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/events{/number}","events_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/events","assignees_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/assignees{/user}","branches_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/branches{/branch}","tags_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/tags","blobs_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/refs{/sha}","trees_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/statuses/{sha}","languages_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/languages","stargazers_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/stargazers","contributors_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/contributors","subscribers_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/subscribers","subscription_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/subscription","commits_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/commits{/sha}","git_commits_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/commits{/sha}","comments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/comments{/number}","issue_comment_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/comments{/number}","contents_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/contents/{+path}","compare_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/merges","archive_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/downloads","issues_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues{/number}","pulls_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls{/number}","milestones_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/milestones{/number}","notifications_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/labels{/name}","releases_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/releases{/id}","deployments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/deployments","created_at":"2017-08-07T03:59:19Z","updated_at":"2018-05-20T17:40:09Z","pushed_at":"2018-05-20T20:21:44Z","git_url":"git://github.com/ticktackim/ticktack-workplan.git","ssh_url":"git@github.com:ticktackim/ticktack-workplan.git","clone_url":"https://github.com/ticktackim/ticktack-workplan.git","svn_url":"https://github.com/ticktackim/ticktack-workplan","homepage":"http://ticktack.im","size":869,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":35,"license":null,"forks":1,"open_issues":35,"watchers":22,"default_branch":"master"}},"base":{"label":"ticktackim:master","ref":"master","sha":"c0dd626b0d708d6baff34a5f1e8fb399bc0119cd","user":{"login":"ticktackim","id":30351648,"avatar_url":"https://avatars3.githubusercontent.com/u/30351648?v=4","gravatar_id":"","url":"https://api.github.com/users/ticktackim","html_url":"https://github.com/ticktackim","followers_url":"https://api.github.com/users/ticktackim/followers","following_url":"https://api.github.com/users/ticktackim/following{/other_user}","gists_url":"https://api.github.com/users/ticktackim/gists{/gist_id}","starred_url":"https://api.github.com/users/ticktackim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticktackim/subscriptions","organizations_url":"https://api.github.com/users/ticktackim/orgs","repos_url":"https://api.github.com/users/ticktackim/repos","events_url":"https://api.github.com/users/ticktackim/events{/privacy}","received_events_url":"https://api.github.com/users/ticktackim/received_events","type":"User","site_admin":false},"repo":{"id":99535018,"name":"ticktack-workplan","full_name":"ticktackim/ticktack-workplan","owner":{"login":"ticktackim","id":30351648,"avatar_url":"https://avatars3.githubusercontent.com/u/30351648?v=4","gravatar_id":"","url":"https://api.github.com/users/ticktackim","html_url":"https://github.com/ticktackim","followers_url":"https://api.github.com/users/ticktackim/followers","following_url":"https://api.github.com/users/ticktackim/following{/other_user}","gists_url":"https://api.github.com/users/ticktackim/gists{/gist_id}","starred_url":"https://api.github.com/users/ticktackim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticktackim/subscriptions","organizations_url":"https://api.github.com/users/ticktackim/orgs","repos_url":"https://api.github.com/users/ticktackim/repos","events_url":"https://api.github.com/users/ticktackim/events{/privacy}","received_events_url":"https://api.github.com/users/ticktackim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ticktackim/ticktack-workplan","description":"This is the main repo for continuous workplan. For official site, visit","fork":false,"url":"https://api.github.com/repos/ticktackim/ticktack-workplan","forks_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/forks","keys_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/teams","hooks_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/hooks","issue_events_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/events{/number}","events_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/events","assignees_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/assignees{/user}","branches_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/branches{/branch}","tags_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/tags","blobs_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/refs{/sha}","trees_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/statuses/{sha}","languages_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/languages","stargazers_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/stargazers","contributors_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/contributors","subscribers_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/subscribers","subscription_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/subscription","commits_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/commits{/sha}","git_commits_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/git/commits{/sha}","comments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/comments{/number}","issue_comment_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/comments{/number}","contents_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/contents/{+path}","compare_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/merges","archive_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/downloads","issues_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues{/number}","pulls_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls{/number}","milestones_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/milestones{/number}","notifications_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/labels{/name}","releases_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/releases{/id}","deployments_url":"https://api.github.com/repos/ticktackim/ticktack-workplan/deployments","created_at":"2017-08-07T03:59:19Z","updated_at":"2018-05-20T17:40:09Z","pushed_at":"2018-05-20T20:21:44Z","git_url":"git://github.com/ticktackim/ticktack-workplan.git","ssh_url":"git@github.com:ticktackim/ticktack-workplan.git","clone_url":"https://github.com/ticktackim/ticktack-workplan.git","svn_url":"https://github.com/ticktackim/ticktack-workplan","homepage":"http://ticktack.im","size":869,"stargazers_count":22,"watchers_count":22,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":35,"license":null,"forks":1,"open_issues":35,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144"},"html":{"href":"https://github.com/ticktackim/ticktack-workplan/pull/144"},"issue":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/144"},"comments":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/issues/144/comments"},"review_comments":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144/comments"},"review_comment":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/pulls/144/commits"},"statuses":{"href":"https://api.github.com/repos/ticktackim/ticktack-workplan/statuses/a712df77a26a0ced340c16b0f754794049f19fe2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mixmix"}}