{"action":"created","comment":{"url":"https://api.github.com/repos/orbiting/haku-backend/pulls/comments/138709577","pull_request_review_id":62542152,"id":138709577,"diff_hunk":"@@ -103,7 +104,9 @@ exports.configure = ({\n   })\n \n   passport.deserializeUser(async function (id, next) {\n-    const user = await Users.findOne({id})\n+    const user = createUser(\n+      await Users.findOne({id})","path":"src/auth.js","position":27,"original_position":27,"commit_id":"a2bd913770bb175a0e1be7701cf80b0ca1bdbf97","original_commit_id":"a2bd913770bb175a0e1be7701cf80b0ca1bdbf97","user":{"login":"tpreusse","id":410211,"avatar_url":"https://avatars2.githubusercontent.com/u/410211?v=4","gravatar_id":"","url":"https://api.github.com/users/tpreusse","html_url":"https://github.com/tpreusse","followers_url":"https://api.github.com/users/tpreusse/followers","following_url":"https://api.github.com/users/tpreusse/following{/other_user}","gists_url":"https://api.github.com/users/tpreusse/gists{/gist_id}","starred_url":"https://api.github.com/users/tpreusse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpreusse/subscriptions","organizations_url":"https://api.github.com/users/tpreusse/orgs","repos_url":"https://api.github.com/users/tpreusse/repos","events_url":"https://api.github.com/users/tpreusse/events{/privacy}","received_events_url":"https://api.github.com/users/tpreusse/received_events","type":"User","site_admin":false},"body":"will probably result in `Uncaught TypeError: Cannot read property 'roles' of undefined` and the below `!user` check will never run","created_at":"2017-09-13T18:58:52Z","updated_at":"2017-09-13T18:58:52Z","html_url":"https://github.com/orbiting/haku-backend/pull/4#discussion_r138709577","pull_request_url":"https://api.github.com/repos/orbiting/haku-backend/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/comments/138709577"},"html":{"href":"https://github.com/orbiting/haku-backend/pull/4#discussion_r138709577"},"pull_request":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/orbiting/haku-backend/pulls/4","id":136625573,"html_url":"https://github.com/orbiting/haku-backend/pull/4","diff_url":"https://github.com/orbiting/haku-backend/pull/4.diff","patch_url":"https://github.com/orbiting/haku-backend/pull/4.patch","issue_url":"https://api.github.com/repos/orbiting/haku-backend/issues/4","number":4,"state":"closed","locked":false,"title":"WIP: API refactor","user":{"login":"patte","id":3500621,"avatar_url":"https://avatars3.githubusercontent.com/u/3500621?v=4","gravatar_id":"","url":"https://api.github.com/users/patte","html_url":"https://github.com/patte","followers_url":"https://api.github.com/users/patte/followers","following_url":"https://api.github.com/users/patte/following{/other_user}","gists_url":"https://api.github.com/users/patte/gists{/gist_id}","starred_url":"https://api.github.com/users/patte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patte/subscriptions","organizations_url":"https://api.github.com/users/patte/orgs","repos_url":"https://api.github.com/users/patte/repos","events_url":"https://api.github.com/users/patte/events{/privacy}","received_events_url":"https://api.github.com/users/patte/received_events","type":"User","site_admin":false},"body":"[all info on repo](http://localhost:3010/graphiql?query=%7B%0A%20%20repo(id%3A%20%22orbiting%2Fnewsletter-test%22)%20%7B%0A%20%20%20%20id%0A%20%20%20%20milestones%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20message%0A%20%20%20%20%20%20commit%20%7B%0A%20%20%20%20%20%20%20%20parentIds%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20message%0A%20%20%20%20%20%20%20%20author%20%7B%0A%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20email%0A%20%20%20%20%20%20%20%20%20%20user%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20date%0A%20%20%20%20%20%20%20%20document%20%7B%0A%20%20%20%20%20%20%20%20%20%20content%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20%0A%20%20%20%20%20%20author%20%7B%0A%20%20%20%20%20%20%20%20email%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20commits(page%3A%201)%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20message%0A%20%20%20%20%20%20parentIds%0A%20%20%20%20%20%20date%0A%20%20%20%20%20%20author%20%7B%0A%20%20%20%20%20%20%20%20email%0A%20%20%20%20%20%20%20%20user%20%7BfirstName%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20document%20%7B%0A%20%20%20%20%20%20%20%20content%0A%20%20%20%20%20%20%20%20commit%20%7B%0A%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20message%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20meta%20%7B%0A%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A)\r\n\r\n[placeMilestone](http://localhost:3010/graphiql?query=mutation%20%7B%0A%20%20placeMilestone(repoId%3A%20%22orbiting%2Fnewsletter-test%22%2C%20commitId%3A%20%2282aa44311e543b26e5c5855781b1e2184cf8b213%22%2C%20name%3A%20%22cvdReady%22%2C%20message%3A%20%22hello%2C%20hello%20is%20my%20message%22)%20%7B%0A%20%20%20%20name%0A%20%20%20%20message%0A%20%20%20%20commit%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%7D%0A%20%20%20%20author%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20user%20%7B%0A%20%20%20%20%20%20%20%20githubScope%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A)\r\n\r\n[removeMilestone](http://localhost:3010/graphiql?query=mutation%20%7B%0A%20%20removeMilestone(repoId%3A%20%22orbiting%2Fnewsletter-test%22%2C%20name%3A%20%22cvdReady%22)%20%0A%7D%0A)\r\n\r\nadd env var:\r\nPUBLIC_ASSETS_URL=http://localhost:PORT/assets\r\n\r\nTODOS:\r\n- [x] commit: keep images, which url's are already replaced, in the tree\r\n- [x] github token auth\r\n- [x] setup testing\r\n- [x] setup testing with travis\r\n- [x] setup coverage reporting with coverall\r\n- [x] date on milestones\r\n- [x] tests\r\n  - [x] commit (new repo)\r\n  - [x] commit check mdast -> markdown\r\n  - [x] commit no-branching\r\n  - [x] commit autobranching\r\n  - [x] commit image replacement\r\n  - [x] placeMilestone\r\n  - [x] removeMilestone\r\n  - [x] uncommitedChanges\r\n  - [x] signOut \r\n- [x] cleanup\r\n  - [x] github proxy\r\n  - [x] github oAuth\r\n  - [x] npm deps","created_at":"2017-08-20T00:02:07Z","updated_at":"2017-09-13T18:58:52Z","closed_at":"2017-09-13T18:13:51Z","merged_at":"2017-09-13T18:13:50Z","merge_commit_sha":"b11b8d27937458b8119eb605fe23fcedac408e8e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/orbiting/haku-backend/pulls/4/commits","review_comments_url":"https://api.github.com/repos/orbiting/haku-backend/pulls/4/comments","review_comment_url":"https://api.github.com/repos/orbiting/haku-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orbiting/haku-backend/issues/4/comments","statuses_url":"https://api.github.com/repos/orbiting/haku-backend/statuses/a2bd913770bb175a0e1be7701cf80b0ca1bdbf97","head":{"label":"orbiting:APIrefactor","ref":"APIrefactor","sha":"a2bd913770bb175a0e1be7701cf80b0ca1bdbf97","user":{"login":"orbiting","id":26253823,"avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"repo":{"id":98179843,"name":"haku-backend","full_name":"orbiting/haku-backend","owner":{"login":"orbiting","id":26253823,"avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbiting/haku-backend","description":"A prototype of our CMS backend with GitHub integration","fork":false,"url":"https://api.github.com/repos/orbiting/haku-backend","forks_url":"https://api.github.com/repos/orbiting/haku-backend/forks","keys_url":"https://api.github.com/repos/orbiting/haku-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbiting/haku-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbiting/haku-backend/teams","hooks_url":"https://api.github.com/repos/orbiting/haku-backend/hooks","issue_events_url":"https://api.github.com/repos/orbiting/haku-backend/issues/events{/number}","events_url":"https://api.github.com/repos/orbiting/haku-backend/events","assignees_url":"https://api.github.com/repos/orbiting/haku-backend/assignees{/user}","branches_url":"https://api.github.com/repos/orbiting/haku-backend/branches{/branch}","tags_url":"https://api.github.com/repos/orbiting/haku-backend/tags","blobs_url":"https://api.github.com/repos/orbiting/haku-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbiting/haku-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbiting/haku-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbiting/haku-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbiting/haku-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/orbiting/haku-backend/languages","stargazers_url":"https://api.github.com/repos/orbiting/haku-backend/stargazers","contributors_url":"https://api.github.com/repos/orbiting/haku-backend/contributors","subscribers_url":"https://api.github.com/repos/orbiting/haku-backend/subscribers","subscription_url":"https://api.github.com/repos/orbiting/haku-backend/subscription","commits_url":"https://api.github.com/repos/orbiting/haku-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbiting/haku-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbiting/haku-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbiting/haku-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbiting/haku-backend/contents/{+path}","compare_url":"https://api.github.com/repos/orbiting/haku-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbiting/haku-backend/merges","archive_url":"https://api.github.com/repos/orbiting/haku-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbiting/haku-backend/downloads","issues_url":"https://api.github.com/repos/orbiting/haku-backend/issues{/number}","pulls_url":"https://api.github.com/repos/orbiting/haku-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/orbiting/haku-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/orbiting/haku-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbiting/haku-backend/labels{/name}","releases_url":"https://api.github.com/repos/orbiting/haku-backend/releases{/id}","deployments_url":"https://api.github.com/repos/orbiting/haku-backend/deployments","created_at":"2017-07-24T10:41:15Z","updated_at":"2017-08-24T23:41:50Z","pushed_at":"2017-09-13T18:28:12Z","git_url":"git://github.com/orbiting/haku-backend.git","ssh_url":"git@github.com:orbiting/haku-backend.git","clone_url":"https://github.com/orbiting/haku-backend.git","svn_url":"https://github.com/orbiting/haku-backend","homepage":"","size":881,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"orbiting:master","ref":"master","sha":"fa31d906a0488f6319bca08fbb74839381cac52b","user":{"login":"orbiting","id":26253823,"avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"repo":{"id":98179843,"name":"haku-backend","full_name":"orbiting/haku-backend","owner":{"login":"orbiting","id":26253823,"avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbiting/haku-backend","description":"A prototype of our CMS backend with GitHub integration","fork":false,"url":"https://api.github.com/repos/orbiting/haku-backend","forks_url":"https://api.github.com/repos/orbiting/haku-backend/forks","keys_url":"https://api.github.com/repos/orbiting/haku-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbiting/haku-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbiting/haku-backend/teams","hooks_url":"https://api.github.com/repos/orbiting/haku-backend/hooks","issue_events_url":"https://api.github.com/repos/orbiting/haku-backend/issues/events{/number}","events_url":"https://api.github.com/repos/orbiting/haku-backend/events","assignees_url":"https://api.github.com/repos/orbiting/haku-backend/assignees{/user}","branches_url":"https://api.github.com/repos/orbiting/haku-backend/branches{/branch}","tags_url":"https://api.github.com/repos/orbiting/haku-backend/tags","blobs_url":"https://api.github.com/repos/orbiting/haku-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbiting/haku-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbiting/haku-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbiting/haku-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbiting/haku-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/orbiting/haku-backend/languages","stargazers_url":"https://api.github.com/repos/orbiting/haku-backend/stargazers","contributors_url":"https://api.github.com/repos/orbiting/haku-backend/contributors","subscribers_url":"https://api.github.com/repos/orbiting/haku-backend/subscribers","subscription_url":"https://api.github.com/repos/orbiting/haku-backend/subscription","commits_url":"https://api.github.com/repos/orbiting/haku-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbiting/haku-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbiting/haku-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbiting/haku-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbiting/haku-backend/contents/{+path}","compare_url":"https://api.github.com/repos/orbiting/haku-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbiting/haku-backend/merges","archive_url":"https://api.github.com/repos/orbiting/haku-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbiting/haku-backend/downloads","issues_url":"https://api.github.com/repos/orbiting/haku-backend/issues{/number}","pulls_url":"https://api.github.com/repos/orbiting/haku-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/orbiting/haku-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/orbiting/haku-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbiting/haku-backend/labels{/name}","releases_url":"https://api.github.com/repos/orbiting/haku-backend/releases{/id}","deployments_url":"https://api.github.com/repos/orbiting/haku-backend/deployments","created_at":"2017-07-24T10:41:15Z","updated_at":"2017-08-24T23:41:50Z","pushed_at":"2017-09-13T18:28:12Z","git_url":"git://github.com/orbiting/haku-backend.git","ssh_url":"git@github.com:orbiting/haku-backend.git","clone_url":"https://github.com/orbiting/haku-backend.git","svn_url":"https://github.com/orbiting/haku-backend","homepage":"","size":881,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/4"},"html":{"href":"https://github.com/orbiting/haku-backend/pull/4"},"issue":{"href":"https://api.github.com/repos/orbiting/haku-backend/issues/4"},"comments":{"href":"https://api.github.com/repos/orbiting/haku-backend/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orbiting/haku-backend/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/orbiting/haku-backend/statuses/a2bd913770bb175a0e1be7701cf80b0ca1bdbf97"}},"author_association":"OWNER"}}
{"actor":{"display_login":"tpreusse"}}