{"action":"created","comment":{"url":"https://api.github.com/repos/redbadger/badger-brain/pulls/comments/69304283","id":69304283,"diff_hunk":"@@ -65,24 +68,26 @@ export async function EventFetch(_, args, req) {\n     (err) => console.log('ERR', err) // eslint-disable-line no-console\n   );\n \n-  if (r.results.length > 0) {\n-    return mapAndSanitateEvent(r.results[0]);\n+  if (res && res.results.length > 0) {\n+    return mapAndSanitate(res.results[0], docType);\n   }\n \n   return {};\n }\n \n export async function AllEventsFetch() {","path":"lib/eventFetch.js","position":68,"original_position":68,"commit_id":"8a7d467f4577b51162d3a24aea3642b3d02f88e7","original_commit_id":"8a7d467f4577b51162d3a24aea3642b3d02f88e7","user":{"login":"asavin","id":487468,"avatar_url":"https://avatars.githubusercontent.com/u/487468?v=3","gravatar_id":"","url":"https://api.github.com/users/asavin","html_url":"https://github.com/asavin","followers_url":"https://api.github.com/users/asavin/followers","following_url":"https://api.github.com/users/asavin/following{/other_user}","gists_url":"https://api.github.com/users/asavin/gists{/gist_id}","starred_url":"https://api.github.com/users/asavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asavin/subscriptions","organizations_url":"https://api.github.com/users/asavin/orgs","repos_url":"https://api.github.com/users/asavin/repos","events_url":"https://api.github.com/users/asavin/events{/privacy}","received_events_url":"https://api.github.com/users/asavin/received_events","type":"User","site_admin":false},"body":"also this function should be renamed","created_at":"2016-07-01T14:06:46Z","updated_at":"2016-07-01T14:06:46Z","html_url":"https://github.com/redbadger/badger-brain/pull/23#discussion_r69304283","pull_request_url":"https://api.github.com/repos/redbadger/badger-brain/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/comments/69304283"},"html":{"href":"https://github.com/redbadger/badger-brain/pull/23#discussion_r69304283"},"pull_request":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/redbadger/badger-brain/pulls/23","id":75984103,"html_url":"https://github.com/redbadger/badger-brain/pull/23","diff_url":"https://github.com/redbadger/badger-brain/pull/23.diff","patch_url":"https://github.com/redbadger/badger-brain/pull/23.patch","issue_url":"https://api.github.com/repos/redbadger/badger-brain/issues/23","number":23,"state":"open","locked":false,"title":"Added Prismic News to Badger Brain","user":{"login":"sebflipper","id":144435,"avatar_url":"https://avatars.githubusercontent.com/u/144435?v=3","gravatar_id":"","url":"https://api.github.com/users/sebflipper","html_url":"https://github.com/sebflipper","followers_url":"https://api.github.com/users/sebflipper/followers","following_url":"https://api.github.com/users/sebflipper/following{/other_user}","gists_url":"https://api.github.com/users/sebflipper/gists{/gist_id}","starred_url":"https://api.github.com/users/sebflipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebflipper/subscriptions","organizations_url":"https://api.github.com/users/sebflipper/orgs","repos_url":"https://api.github.com/users/sebflipper/repos","events_url":"https://api.github.com/users/sebflipper/events{/privacy}","received_events_url":"https://api.github.com/users/sebflipper/received_events","type":"User","site_admin":false},"body":"### Pre-flight checklist\r\n\r\n![trump](http://i.giphy.com/3lzI74ewcCUBq.gif)\r\n\r\n- [x] Unit tests\r\n- [x] GraphiQL tested\r\n- [x] Client app tested\r\n- [x] Gif added\r\n\r\n","created_at":"2016-07-01T13:59:13Z","updated_at":"2016-07-01T14:06:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4ef28df0eed7945048c9ed67af35aff00f9f060","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/redbadger/badger-brain/pulls/23/commits","review_comments_url":"https://api.github.com/repos/redbadger/badger-brain/pulls/23/comments","review_comment_url":"https://api.github.com/repos/redbadger/badger-brain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redbadger/badger-brain/issues/23/comments","statuses_url":"https://api.github.com/repos/redbadger/badger-brain/statuses/8a7d467f4577b51162d3a24aea3642b3d02f88e7","head":{"label":"redbadger:news","ref":"news","sha":"8a7d467f4577b51162d3a24aea3642b3d02f88e7","user":{"login":"redbadger","id":265650,"avatar_url":"https://avatars.githubusercontent.com/u/265650?v=3","gravatar_id":"","url":"https://api.github.com/users/redbadger","html_url":"https://github.com/redbadger","followers_url":"https://api.github.com/users/redbadger/followers","following_url":"https://api.github.com/users/redbadger/following{/other_user}","gists_url":"https://api.github.com/users/redbadger/gists{/gist_id}","starred_url":"https://api.github.com/users/redbadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redbadger/subscriptions","organizations_url":"https://api.github.com/users/redbadger/orgs","repos_url":"https://api.github.com/users/redbadger/repos","events_url":"https://api.github.com/users/redbadger/events{/privacy}","received_events_url":"https://api.github.com/users/redbadger/received_events","type":"Organization","site_admin":false},"repo":{"id":60530986,"name":"badger-brain","full_name":"redbadger/badger-brain","owner":{"login":"redbadger","id":265650,"avatar_url":"https://avatars.githubusercontent.com/u/265650?v=3","gravatar_id":"","url":"https://api.github.com/users/redbadger","html_url":"https://github.com/redbadger","followers_url":"https://api.github.com/users/redbadger/followers","following_url":"https://api.github.com/users/redbadger/following{/other_user}","gists_url":"https://api.github.com/users/redbadger/gists{/gist_id}","starred_url":"https://api.github.com/users/redbadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redbadger/subscriptions","organizations_url":"https://api.github.com/users/redbadger/orgs","repos_url":"https://api.github.com/users/redbadger/repos","events_url":"https://api.github.com/users/redbadger/events{/privacy}","received_events_url":"https://api.github.com/users/redbadger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redbadger/badger-brain","description":"GraphQL server for all Red Badger related data","fork":false,"url":"https://api.github.com/repos/redbadger/badger-brain","forks_url":"https://api.github.com/repos/redbadger/badger-brain/forks","keys_url":"https://api.github.com/repos/redbadger/badger-brain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redbadger/badger-brain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redbadger/badger-brain/teams","hooks_url":"https://api.github.com/repos/redbadger/badger-brain/hooks","issue_events_url":"https://api.github.com/repos/redbadger/badger-brain/issues/events{/number}","events_url":"https://api.github.com/repos/redbadger/badger-brain/events","assignees_url":"https://api.github.com/repos/redbadger/badger-brain/assignees{/user}","branches_url":"https://api.github.com/repos/redbadger/badger-brain/branches{/branch}","tags_url":"https://api.github.com/repos/redbadger/badger-brain/tags","blobs_url":"https://api.github.com/repos/redbadger/badger-brain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redbadger/badger-brain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redbadger/badger-brain/git/refs{/sha}","trees_url":"https://api.github.com/repos/redbadger/badger-brain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redbadger/badger-brain/statuses/{sha}","languages_url":"https://api.github.com/repos/redbadger/badger-brain/languages","stargazers_url":"https://api.github.com/repos/redbadger/badger-brain/stargazers","contributors_url":"https://api.github.com/repos/redbadger/badger-brain/contributors","subscribers_url":"https://api.github.com/repos/redbadger/badger-brain/subscribers","subscription_url":"https://api.github.com/repos/redbadger/badger-brain/subscription","commits_url":"https://api.github.com/repos/redbadger/badger-brain/commits{/sha}","git_commits_url":"https://api.github.com/repos/redbadger/badger-brain/git/commits{/sha}","comments_url":"https://api.github.com/repos/redbadger/badger-brain/comments{/number}","issue_comment_url":"https://api.github.com/repos/redbadger/badger-brain/issues/comments{/number}","contents_url":"https://api.github.com/repos/redbadger/badger-brain/contents/{+path}","compare_url":"https://api.github.com/repos/redbadger/badger-brain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redbadger/badger-brain/merges","archive_url":"https://api.github.com/repos/redbadger/badger-brain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redbadger/badger-brain/downloads","issues_url":"https://api.github.com/repos/redbadger/badger-brain/issues{/number}","pulls_url":"https://api.github.com/repos/redbadger/badger-brain/pulls{/number}","milestones_url":"https://api.github.com/repos/redbadger/badger-brain/milestones{/number}","notifications_url":"https://api.github.com/repos/redbadger/badger-brain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redbadger/badger-brain/labels{/name}","releases_url":"https://api.github.com/repos/redbadger/badger-brain/releases{/id}","deployments_url":"https://api.github.com/repos/redbadger/badger-brain/deployments","created_at":"2016-06-06T13:41:11Z","updated_at":"2016-06-10T14:46:12Z","pushed_at":"2016-07-01T14:00:42Z","git_url":"git://github.com/redbadger/badger-brain.git","ssh_url":"git@github.com:redbadger/badger-brain.git","clone_url":"https://github.com/redbadger/badger-brain.git","svn_url":"https://github.com/redbadger/badger-brain","homepage":null,"size":92,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"redbadger:master","ref":"master","sha":"64511b1e8b4a5000ee75abbe5922b5d2e845699a","user":{"login":"redbadger","id":265650,"avatar_url":"https://avatars.githubusercontent.com/u/265650?v=3","gravatar_id":"","url":"https://api.github.com/users/redbadger","html_url":"https://github.com/redbadger","followers_url":"https://api.github.com/users/redbadger/followers","following_url":"https://api.github.com/users/redbadger/following{/other_user}","gists_url":"https://api.github.com/users/redbadger/gists{/gist_id}","starred_url":"https://api.github.com/users/redbadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redbadger/subscriptions","organizations_url":"https://api.github.com/users/redbadger/orgs","repos_url":"https://api.github.com/users/redbadger/repos","events_url":"https://api.github.com/users/redbadger/events{/privacy}","received_events_url":"https://api.github.com/users/redbadger/received_events","type":"Organization","site_admin":false},"repo":{"id":60530986,"name":"badger-brain","full_name":"redbadger/badger-brain","owner":{"login":"redbadger","id":265650,"avatar_url":"https://avatars.githubusercontent.com/u/265650?v=3","gravatar_id":"","url":"https://api.github.com/users/redbadger","html_url":"https://github.com/redbadger","followers_url":"https://api.github.com/users/redbadger/followers","following_url":"https://api.github.com/users/redbadger/following{/other_user}","gists_url":"https://api.github.com/users/redbadger/gists{/gist_id}","starred_url":"https://api.github.com/users/redbadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redbadger/subscriptions","organizations_url":"https://api.github.com/users/redbadger/orgs","repos_url":"https://api.github.com/users/redbadger/repos","events_url":"https://api.github.com/users/redbadger/events{/privacy}","received_events_url":"https://api.github.com/users/redbadger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/redbadger/badger-brain","description":"GraphQL server for all Red Badger related data","fork":false,"url":"https://api.github.com/repos/redbadger/badger-brain","forks_url":"https://api.github.com/repos/redbadger/badger-brain/forks","keys_url":"https://api.github.com/repos/redbadger/badger-brain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redbadger/badger-brain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redbadger/badger-brain/teams","hooks_url":"https://api.github.com/repos/redbadger/badger-brain/hooks","issue_events_url":"https://api.github.com/repos/redbadger/badger-brain/issues/events{/number}","events_url":"https://api.github.com/repos/redbadger/badger-brain/events","assignees_url":"https://api.github.com/repos/redbadger/badger-brain/assignees{/user}","branches_url":"https://api.github.com/repos/redbadger/badger-brain/branches{/branch}","tags_url":"https://api.github.com/repos/redbadger/badger-brain/tags","blobs_url":"https://api.github.com/repos/redbadger/badger-brain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redbadger/badger-brain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redbadger/badger-brain/git/refs{/sha}","trees_url":"https://api.github.com/repos/redbadger/badger-brain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redbadger/badger-brain/statuses/{sha}","languages_url":"https://api.github.com/repos/redbadger/badger-brain/languages","stargazers_url":"https://api.github.com/repos/redbadger/badger-brain/stargazers","contributors_url":"https://api.github.com/repos/redbadger/badger-brain/contributors","subscribers_url":"https://api.github.com/repos/redbadger/badger-brain/subscribers","subscription_url":"https://api.github.com/repos/redbadger/badger-brain/subscription","commits_url":"https://api.github.com/repos/redbadger/badger-brain/commits{/sha}","git_commits_url":"https://api.github.com/repos/redbadger/badger-brain/git/commits{/sha}","comments_url":"https://api.github.com/repos/redbadger/badger-brain/comments{/number}","issue_comment_url":"https://api.github.com/repos/redbadger/badger-brain/issues/comments{/number}","contents_url":"https://api.github.com/repos/redbadger/badger-brain/contents/{+path}","compare_url":"https://api.github.com/repos/redbadger/badger-brain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redbadger/badger-brain/merges","archive_url":"https://api.github.com/repos/redbadger/badger-brain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redbadger/badger-brain/downloads","issues_url":"https://api.github.com/repos/redbadger/badger-brain/issues{/number}","pulls_url":"https://api.github.com/repos/redbadger/badger-brain/pulls{/number}","milestones_url":"https://api.github.com/repos/redbadger/badger-brain/milestones{/number}","notifications_url":"https://api.github.com/repos/redbadger/badger-brain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redbadger/badger-brain/labels{/name}","releases_url":"https://api.github.com/repos/redbadger/badger-brain/releases{/id}","deployments_url":"https://api.github.com/repos/redbadger/badger-brain/deployments","created_at":"2016-06-06T13:41:11Z","updated_at":"2016-06-10T14:46:12Z","pushed_at":"2016-07-01T14:00:42Z","git_url":"git://github.com/redbadger/badger-brain.git","ssh_url":"git@github.com:redbadger/badger-brain.git","clone_url":"https://github.com/redbadger/badger-brain.git","svn_url":"https://github.com/redbadger/badger-brain","homepage":null,"size":92,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/23"},"html":{"href":"https://github.com/redbadger/badger-brain/pull/23"},"issue":{"href":"https://api.github.com/repos/redbadger/badger-brain/issues/23"},"comments":{"href":"https://api.github.com/repos/redbadger/badger-brain/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redbadger/badger-brain/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/redbadger/badger-brain/statuses/8a7d467f4577b51162d3a24aea3642b3d02f88e7"}}}}
{"actor":{"display_login":"asavin"}}