{"action":"created","comment":{"url":"https://api.github.com/repos/bleenco/morose/pulls/comments/119098882","pull_request_review_id":40947810,"id":119098882,"diff_hunk":"@@ -0,0 +1,42 @@\n+import * as fs from '../utils/fs';\n+import { generateHash } from '../../../src/api/auth';\n+\n+export default function() {\n+  let authPath = 'morose/auth.json';\n+  let configPath = 'morose/config.json';\n+\n+  let secret = Math.random().toString(36).substr(2, 10);\n+  let pass = generateHash('blabla', secret);\n+  let config = {\n+    port: 10000,\n+    ssl: false,\n+    secret: secret,\n+    upstream: 'https://registry.npmjs.org',\n+    useUpstream: true,\n+    saveUpstreamPackages: true\n+  };\n+  let auth = {\n+      organizations: [\n+        {\n+          name: 'bleenco',\n+          teams: [ { name: 'developers', members: [ 'admin' ] } ],\n+          members: [ { name: 'admin', role: 'owner' } ],\n+          packages: []\n+        }\n+      ],\n+      users: [\n+        { name: 'admin', password: pass, fullName: '', email: '', tokens: [] },\n+        { name: 'developer', password: pass, fullName: '', email: '', tokens: [] }\n+      ],\n+      packages: []\n+    };\n+\n+  return Promise.resolve()\n+    .then(() => fs.createDir('morose'))\n+    .then(() => {","path":"tests/e2e/setup/400-morose-init-files.ts","position":null,"original_position":36,"commit_id":"d5d41705300313c66e496158a365c8afcd638397","original_commit_id":"4d52f0fd07acd3e075c0ccec30d506f969e3e4fa","user":{"login":"jkuri","id":1796022,"avatar_url":"https://avatars2.githubusercontent.com/u/1796022?v=3","gravatar_id":"","url":"https://api.github.com/users/jkuri","html_url":"https://github.com/jkuri","followers_url":"https://api.github.com/users/jkuri/followers","following_url":"https://api.github.com/users/jkuri/following{/other_user}","gists_url":"https://api.github.com/users/jkuri/gists{/gist_id}","starred_url":"https://api.github.com/users/jkuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkuri/subscriptions","organizations_url":"https://api.github.com/users/jkuri/orgs","repos_url":"https://api.github.com/users/jkuri/repos","events_url":"https://api.github.com/users/jkuri/events{/privacy}","received_events_url":"https://api.github.com/users/jkuri/received_events","type":"User","site_admin":false},"body":"```ts\r\n.then(() => fs.writeJsonFile(configPath, config)\r\n.then(() => fs.writeJsonFile(authPath, auth)\r\n```\r\nthis is nicer, I think. \r\nWhen using arrow function `=>` you can use oneliners, they return by default, so:\r\n```ts\r\n.then(() => {\r\n  return fs.writeJsonFile(configPath, config);\r\n})\r\n```\r\nis exactly same as\r\n```ts\r\n.then(() => fs.writeJsonFile(configPath)\r\n```","created_at":"2017-05-30T13:31:13Z","updated_at":"2017-05-30T13:31:14Z","html_url":"https://github.com/bleenco/morose/pull/43#discussion_r119098882","pull_request_url":"https://api.github.com/repos/bleenco/morose/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/bleenco/morose/pulls/comments/119098882"},"html":{"href":"https://github.com/bleenco/morose/pull/43#discussion_r119098882"},"pull_request":{"href":"https://api.github.com/repos/bleenco/morose/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/bleenco/morose/pulls/43","id":123049375,"html_url":"https://github.com/bleenco/morose/pull/43","diff_url":"https://github.com/bleenco/morose/pull/43.diff","patch_url":"https://github.com/bleenco/morose/pull/43.patch","issue_url":"https://api.github.com/repos/bleenco/morose/issues/43","number":43,"state":"open","locked":false,"title":"test(): e2e tests for npm owner","user":{"login":"Izak88","id":8555269,"avatar_url":"https://avatars3.githubusercontent.com/u/8555269?v=3","gravatar_id":"","url":"https://api.github.com/users/Izak88","html_url":"https://github.com/Izak88","followers_url":"https://api.github.com/users/Izak88/followers","following_url":"https://api.github.com/users/Izak88/following{/other_user}","gists_url":"https://api.github.com/users/Izak88/gists{/gist_id}","starred_url":"https://api.github.com/users/Izak88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izak88/subscriptions","organizations_url":"https://api.github.com/users/Izak88/orgs","repos_url":"https://api.github.com/users/Izak88/repos","events_url":"https://api.github.com/users/Izak88/events{/privacy}","received_events_url":"https://api.github.com/users/Izak88/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-30T13:25:16Z","updated_at":"2017-05-30T13:31:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6caa07f2967944528f7346d30f97c92c6070618","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/bleenco/morose/pulls/43/commits","review_comments_url":"https://api.github.com/repos/bleenco/morose/pulls/43/comments","review_comment_url":"https://api.github.com/repos/bleenco/morose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bleenco/morose/issues/43/comments","statuses_url":"https://api.github.com/repos/bleenco/morose/statuses/d5d41705300313c66e496158a365c8afcd638397","head":{"label":"Izak88:e2e-tests","ref":"e2e-tests","sha":"d5d41705300313c66e496158a365c8afcd638397","user":{"login":"Izak88","id":8555269,"avatar_url":"https://avatars3.githubusercontent.com/u/8555269?v=3","gravatar_id":"","url":"https://api.github.com/users/Izak88","html_url":"https://github.com/Izak88","followers_url":"https://api.github.com/users/Izak88/followers","following_url":"https://api.github.com/users/Izak88/following{/other_user}","gists_url":"https://api.github.com/users/Izak88/gists{/gist_id}","starred_url":"https://api.github.com/users/Izak88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izak88/subscriptions","organizations_url":"https://api.github.com/users/Izak88/orgs","repos_url":"https://api.github.com/users/Izak88/repos","events_url":"https://api.github.com/users/Izak88/events{/privacy}","received_events_url":"https://api.github.com/users/Izak88/received_events","type":"User","site_admin":false},"repo":{"id":86796312,"name":"morose","full_name":"Izak88/morose","owner":{"login":"Izak88","id":8555269,"avatar_url":"https://avatars3.githubusercontent.com/u/8555269?v=3","gravatar_id":"","url":"https://api.github.com/users/Izak88","html_url":"https://github.com/Izak88","followers_url":"https://api.github.com/users/Izak88/followers","following_url":"https://api.github.com/users/Izak88/following{/other_user}","gists_url":"https://api.github.com/users/Izak88/gists{/gist_id}","starred_url":"https://api.github.com/users/Izak88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izak88/subscriptions","organizations_url":"https://api.github.com/users/Izak88/orgs","repos_url":"https://api.github.com/users/Izak88/repos","events_url":"https://api.github.com/users/Izak88/events{/privacy}","received_events_url":"https://api.github.com/users/Izak88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Izak88/morose","description":"📦 npm private registry and proxy server","fork":true,"url":"https://api.github.com/repos/Izak88/morose","forks_url":"https://api.github.com/repos/Izak88/morose/forks","keys_url":"https://api.github.com/repos/Izak88/morose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Izak88/morose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Izak88/morose/teams","hooks_url":"https://api.github.com/repos/Izak88/morose/hooks","issue_events_url":"https://api.github.com/repos/Izak88/morose/issues/events{/number}","events_url":"https://api.github.com/repos/Izak88/morose/events","assignees_url":"https://api.github.com/repos/Izak88/morose/assignees{/user}","branches_url":"https://api.github.com/repos/Izak88/morose/branches{/branch}","tags_url":"https://api.github.com/repos/Izak88/morose/tags","blobs_url":"https://api.github.com/repos/Izak88/morose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Izak88/morose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Izak88/morose/git/refs{/sha}","trees_url":"https://api.github.com/repos/Izak88/morose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Izak88/morose/statuses/{sha}","languages_url":"https://api.github.com/repos/Izak88/morose/languages","stargazers_url":"https://api.github.com/repos/Izak88/morose/stargazers","contributors_url":"https://api.github.com/repos/Izak88/morose/contributors","subscribers_url":"https://api.github.com/repos/Izak88/morose/subscribers","subscription_url":"https://api.github.com/repos/Izak88/morose/subscription","commits_url":"https://api.github.com/repos/Izak88/morose/commits{/sha}","git_commits_url":"https://api.github.com/repos/Izak88/morose/git/commits{/sha}","comments_url":"https://api.github.com/repos/Izak88/morose/comments{/number}","issue_comment_url":"https://api.github.com/repos/Izak88/morose/issues/comments{/number}","contents_url":"https://api.github.com/repos/Izak88/morose/contents/{+path}","compare_url":"https://api.github.com/repos/Izak88/morose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Izak88/morose/merges","archive_url":"https://api.github.com/repos/Izak88/morose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Izak88/morose/downloads","issues_url":"https://api.github.com/repos/Izak88/morose/issues{/number}","pulls_url":"https://api.github.com/repos/Izak88/morose/pulls{/number}","milestones_url":"https://api.github.com/repos/Izak88/morose/milestones{/number}","notifications_url":"https://api.github.com/repos/Izak88/morose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Izak88/morose/labels{/name}","releases_url":"https://api.github.com/repos/Izak88/morose/releases{/id}","deployments_url":"https://api.github.com/repos/Izak88/morose/deployments","created_at":"2017-03-31T08:26:33Z","updated_at":"2017-03-31T08:26:35Z","pushed_at":"2017-05-30T13:30:59Z","git_url":"git://github.com/Izak88/morose.git","ssh_url":"git@github.com:Izak88/morose.git","clone_url":"https://github.com/Izak88/morose.git","svn_url":"https://github.com/Izak88/morose","homepage":"","size":1160,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bleenco:master","ref":"master","sha":"3622b8b49d6190488eff7863a19689eef7983302","user":{"login":"bleenco","id":26046537,"avatar_url":"https://avatars1.githubusercontent.com/u/26046537?v=3","gravatar_id":"","url":"https://api.github.com/users/bleenco","html_url":"https://github.com/bleenco","followers_url":"https://api.github.com/users/bleenco/followers","following_url":"https://api.github.com/users/bleenco/following{/other_user}","gists_url":"https://api.github.com/users/bleenco/gists{/gist_id}","starred_url":"https://api.github.com/users/bleenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleenco/subscriptions","organizations_url":"https://api.github.com/users/bleenco/orgs","repos_url":"https://api.github.com/users/bleenco/repos","events_url":"https://api.github.com/users/bleenco/events{/privacy}","received_events_url":"https://api.github.com/users/bleenco/received_events","type":"Organization","site_admin":false},"repo":{"id":72294758,"name":"morose","full_name":"bleenco/morose","owner":{"login":"bleenco","id":26046537,"avatar_url":"https://avatars1.githubusercontent.com/u/26046537?v=3","gravatar_id":"","url":"https://api.github.com/users/bleenco","html_url":"https://github.com/bleenco","followers_url":"https://api.github.com/users/bleenco/followers","following_url":"https://api.github.com/users/bleenco/following{/other_user}","gists_url":"https://api.github.com/users/bleenco/gists{/gist_id}","starred_url":"https://api.github.com/users/bleenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleenco/subscriptions","organizations_url":"https://api.github.com/users/bleenco/orgs","repos_url":"https://api.github.com/users/bleenco/repos","events_url":"https://api.github.com/users/bleenco/events{/privacy}","received_events_url":"https://api.github.com/users/bleenco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bleenco/morose","description":"📦 npm private registry and proxy server","fork":false,"url":"https://api.github.com/repos/bleenco/morose","forks_url":"https://api.github.com/repos/bleenco/morose/forks","keys_url":"https://api.github.com/repos/bleenco/morose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bleenco/morose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bleenco/morose/teams","hooks_url":"https://api.github.com/repos/bleenco/morose/hooks","issue_events_url":"https://api.github.com/repos/bleenco/morose/issues/events{/number}","events_url":"https://api.github.com/repos/bleenco/morose/events","assignees_url":"https://api.github.com/repos/bleenco/morose/assignees{/user}","branches_url":"https://api.github.com/repos/bleenco/morose/branches{/branch}","tags_url":"https://api.github.com/repos/bleenco/morose/tags","blobs_url":"https://api.github.com/repos/bleenco/morose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bleenco/morose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bleenco/morose/git/refs{/sha}","trees_url":"https://api.github.com/repos/bleenco/morose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bleenco/morose/statuses/{sha}","languages_url":"https://api.github.com/repos/bleenco/morose/languages","stargazers_url":"https://api.github.com/repos/bleenco/morose/stargazers","contributors_url":"https://api.github.com/repos/bleenco/morose/contributors","subscribers_url":"https://api.github.com/repos/bleenco/morose/subscribers","subscription_url":"https://api.github.com/repos/bleenco/morose/subscription","commits_url":"https://api.github.com/repos/bleenco/morose/commits{/sha}","git_commits_url":"https://api.github.com/repos/bleenco/morose/git/commits{/sha}","comments_url":"https://api.github.com/repos/bleenco/morose/comments{/number}","issue_comment_url":"https://api.github.com/repos/bleenco/morose/issues/comments{/number}","contents_url":"https://api.github.com/repos/bleenco/morose/contents/{+path}","compare_url":"https://api.github.com/repos/bleenco/morose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bleenco/morose/merges","archive_url":"https://api.github.com/repos/bleenco/morose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bleenco/morose/downloads","issues_url":"https://api.github.com/repos/bleenco/morose/issues{/number}","pulls_url":"https://api.github.com/repos/bleenco/morose/pulls{/number}","milestones_url":"https://api.github.com/repos/bleenco/morose/milestones{/number}","notifications_url":"https://api.github.com/repos/bleenco/morose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bleenco/morose/labels{/name}","releases_url":"https://api.github.com/repos/bleenco/morose/releases{/id}","deployments_url":"https://api.github.com/repos/bleenco/morose/deployments","created_at":"2016-10-29T16:02:28Z","updated_at":"2017-05-19T19:45:22Z","pushed_at":"2017-05-30T13:31:00Z","git_url":"git://github.com/bleenco/morose.git","ssh_url":"git@github.com:bleenco/morose.git","clone_url":"https://github.com/bleenco/morose.git","svn_url":"https://github.com/bleenco/morose","homepage":"","size":1159,"stargazers_count":8,"watchers_count":8,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":8,"forks":3,"open_issues":8,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bleenco/morose/pulls/43"},"html":{"href":"https://github.com/bleenco/morose/pull/43"},"issue":{"href":"https://api.github.com/repos/bleenco/morose/issues/43"},"comments":{"href":"https://api.github.com/repos/bleenco/morose/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/bleenco/morose/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/bleenco/morose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bleenco/morose/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/bleenco/morose/statuses/d5d41705300313c66e496158a365c8afcd638397"}}}}
{"actor":{"display_login":"jkuri"}}