{"action":"created","comment":{"url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/comments/171156881","pull_request_review_id":99959321,"id":171156881,"diff_hunk":"@@ -1,14 +1,22 @@\n import { Sequelize } from 'sequelize'\n \n+const setDatabase = () => {\n+  let database\n+  if (process.env.DATABASE_URL) {\n+    database = process.env.DATABASE_URL\n+  } else {\n+    database = 'postgres://postgres:postgres@localhost/postgres'\n+  }\n+  return database\n+}\n+\n const Connection = new Sequelize(\n-  'postgres',\n-  'postgres',\n-  'postgres',\n+  setDatabase(),","path":"src/database.js","position":17,"original_position":17,"commit_id":"3b72806fa8b824aa15ca6954218a282201207222","original_commit_id":"3b72806fa8b824aa15ca6954218a282201207222","user":{"login":"petrosagg","id":939420,"avatar_url":"https://avatars3.githubusercontent.com/u/939420?v=4","gravatar_id":"","url":"https://api.github.com/users/petrosagg","html_url":"https://github.com/petrosagg","followers_url":"https://api.github.com/users/petrosagg/followers","following_url":"https://api.github.com/users/petrosagg/following{/other_user}","gists_url":"https://api.github.com/users/petrosagg/gists{/gist_id}","starred_url":"https://api.github.com/users/petrosagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrosagg/subscriptions","organizations_url":"https://api.github.com/users/petrosagg/orgs","repos_url":"https://api.github.com/users/petrosagg/repos","events_url":"https://api.github.com/users/petrosagg/events{/privacy}","received_events_url":"https://api.github.com/users/petrosagg/received_events","type":"User","site_admin":false},"body":"this can be condensed to: `process.env.DATABASE_URL || 'postgres://postgres:postgres@localhost/postgres'` like we do for the port here https://github.com/esarafianou/harmonise.it/blob/a85bd7/src/server.js#L27","created_at":"2018-02-28T07:01:12Z","updated_at":"2018-02-28T07:08:21Z","html_url":"https://github.com/esarafianou/harmonise.it/pull/9#discussion_r171156881","pull_request_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/comments/171156881"},"html":{"href":"https://github.com/esarafianou/harmonise.it/pull/9#discussion_r171156881"},"pull_request":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9","id":170043348,"html_url":"https://github.com/esarafianou/harmonise.it/pull/9","diff_url":"https://github.com/esarafianou/harmonise.it/pull/9.diff","patch_url":"https://github.com/esarafianou/harmonise.it/pull/9.patch","issue_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/9","number":9,"state":"open","locked":false,"title":"Update ui after auth","user":{"login":"esarafianou","id":17114347,"avatar_url":"https://avatars0.githubusercontent.com/u/17114347?v=4","gravatar_id":"","url":"https://api.github.com/users/esarafianou","html_url":"https://github.com/esarafianou","followers_url":"https://api.github.com/users/esarafianou/followers","following_url":"https://api.github.com/users/esarafianou/following{/other_user}","gists_url":"https://api.github.com/users/esarafianou/gists{/gist_id}","starred_url":"https://api.github.com/users/esarafianou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esarafianou/subscriptions","organizations_url":"https://api.github.com/users/esarafianou/orgs","repos_url":"https://api.github.com/users/esarafianou/repos","events_url":"https://api.github.com/users/esarafianou/events{/privacy}","received_events_url":"https://api.github.com/users/esarafianou/received_events","type":"User","site_admin":false},"body":"- Created /me query endpoint which fetches the current logged in user\r\n- Show different navigation bar depending on whether the user is logged in\r\n- Implemented a logout functionality","created_at":"2018-02-19T20:06:36Z","updated_at":"2018-02-28T07:08:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a37dddc76ab4dad590b1f1db5d894c37c8f0b93","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9/commits","review_comments_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9/comments","review_comment_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/9/comments","statuses_url":"https://api.github.com/repos/esarafianou/harmonise.it/statuses/3b72806fa8b824aa15ca6954218a282201207222","head":{"label":"esarafianou:updateUIafterAuth","ref":"updateUIafterAuth","sha":"3b72806fa8b824aa15ca6954218a282201207222","user":{"login":"esarafianou","id":17114347,"avatar_url":"https://avatars0.githubusercontent.com/u/17114347?v=4","gravatar_id":"","url":"https://api.github.com/users/esarafianou","html_url":"https://github.com/esarafianou","followers_url":"https://api.github.com/users/esarafianou/followers","following_url":"https://api.github.com/users/esarafianou/following{/other_user}","gists_url":"https://api.github.com/users/esarafianou/gists{/gist_id}","starred_url":"https://api.github.com/users/esarafianou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esarafianou/subscriptions","organizations_url":"https://api.github.com/users/esarafianou/orgs","repos_url":"https://api.github.com/users/esarafianou/repos","events_url":"https://api.github.com/users/esarafianou/events{/privacy}","received_events_url":"https://api.github.com/users/esarafianou/received_events","type":"User","site_admin":false},"repo":{"id":98587005,"name":"harmonise.it","full_name":"esarafianou/harmonise.it","owner":{"login":"esarafianou","id":17114347,"avatar_url":"https://avatars0.githubusercontent.com/u/17114347?v=4","gravatar_id":"","url":"https://api.github.com/users/esarafianou","html_url":"https://github.com/esarafianou","followers_url":"https://api.github.com/users/esarafianou/followers","following_url":"https://api.github.com/users/esarafianou/following{/other_user}","gists_url":"https://api.github.com/users/esarafianou/gists{/gist_id}","starred_url":"https://api.github.com/users/esarafianou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esarafianou/subscriptions","organizations_url":"https://api.github.com/users/esarafianou/orgs","repos_url":"https://api.github.com/users/esarafianou/repos","events_url":"https://api.github.com/users/esarafianou/events{/privacy}","received_events_url":"https://api.github.com/users/esarafianou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esarafianou/harmonise.it","description":"Practice music theory harmony rules  online","fork":false,"url":"https://api.github.com/repos/esarafianou/harmonise.it","forks_url":"https://api.github.com/repos/esarafianou/harmonise.it/forks","keys_url":"https://api.github.com/repos/esarafianou/harmonise.it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esarafianou/harmonise.it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esarafianou/harmonise.it/teams","hooks_url":"https://api.github.com/repos/esarafianou/harmonise.it/hooks","issue_events_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/events{/number}","events_url":"https://api.github.com/repos/esarafianou/harmonise.it/events","assignees_url":"https://api.github.com/repos/esarafianou/harmonise.it/assignees{/user}","branches_url":"https://api.github.com/repos/esarafianou/harmonise.it/branches{/branch}","tags_url":"https://api.github.com/repos/esarafianou/harmonise.it/tags","blobs_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/refs{/sha}","trees_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esarafianou/harmonise.it/statuses/{sha}","languages_url":"https://api.github.com/repos/esarafianou/harmonise.it/languages","stargazers_url":"https://api.github.com/repos/esarafianou/harmonise.it/stargazers","contributors_url":"https://api.github.com/repos/esarafianou/harmonise.it/contributors","subscribers_url":"https://api.github.com/repos/esarafianou/harmonise.it/subscribers","subscription_url":"https://api.github.com/repos/esarafianou/harmonise.it/subscription","commits_url":"https://api.github.com/repos/esarafianou/harmonise.it/commits{/sha}","git_commits_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/commits{/sha}","comments_url":"https://api.github.com/repos/esarafianou/harmonise.it/comments{/number}","issue_comment_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/comments{/number}","contents_url":"https://api.github.com/repos/esarafianou/harmonise.it/contents/{+path}","compare_url":"https://api.github.com/repos/esarafianou/harmonise.it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esarafianou/harmonise.it/merges","archive_url":"https://api.github.com/repos/esarafianou/harmonise.it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esarafianou/harmonise.it/downloads","issues_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues{/number}","pulls_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls{/number}","milestones_url":"https://api.github.com/repos/esarafianou/harmonise.it/milestones{/number}","notifications_url":"https://api.github.com/repos/esarafianou/harmonise.it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esarafianou/harmonise.it/labels{/name}","releases_url":"https://api.github.com/repos/esarafianou/harmonise.it/releases{/id}","deployments_url":"https://api.github.com/repos/esarafianou/harmonise.it/deployments","created_at":"2017-07-27T23:15:37Z","updated_at":"2018-01-24T13:28:02Z","pushed_at":"2018-02-27T12:51:31Z","git_url":"git://github.com/esarafianou/harmonise.it.git","ssh_url":"git@github.com:esarafianou/harmonise.it.git","clone_url":"https://github.com/esarafianou/harmonise.it.git","svn_url":"https://github.com/esarafianou/harmonise.it","homepage":"","size":277,"stargazers_count":1,"watchers_count":1,"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":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"esarafianou:master","ref":"master","sha":"e289808f3418e6fcf06a05977cf5b0994c4e0d89","user":{"login":"esarafianou","id":17114347,"avatar_url":"https://avatars0.githubusercontent.com/u/17114347?v=4","gravatar_id":"","url":"https://api.github.com/users/esarafianou","html_url":"https://github.com/esarafianou","followers_url":"https://api.github.com/users/esarafianou/followers","following_url":"https://api.github.com/users/esarafianou/following{/other_user}","gists_url":"https://api.github.com/users/esarafianou/gists{/gist_id}","starred_url":"https://api.github.com/users/esarafianou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esarafianou/subscriptions","organizations_url":"https://api.github.com/users/esarafianou/orgs","repos_url":"https://api.github.com/users/esarafianou/repos","events_url":"https://api.github.com/users/esarafianou/events{/privacy}","received_events_url":"https://api.github.com/users/esarafianou/received_events","type":"User","site_admin":false},"repo":{"id":98587005,"name":"harmonise.it","full_name":"esarafianou/harmonise.it","owner":{"login":"esarafianou","id":17114347,"avatar_url":"https://avatars0.githubusercontent.com/u/17114347?v=4","gravatar_id":"","url":"https://api.github.com/users/esarafianou","html_url":"https://github.com/esarafianou","followers_url":"https://api.github.com/users/esarafianou/followers","following_url":"https://api.github.com/users/esarafianou/following{/other_user}","gists_url":"https://api.github.com/users/esarafianou/gists{/gist_id}","starred_url":"https://api.github.com/users/esarafianou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esarafianou/subscriptions","organizations_url":"https://api.github.com/users/esarafianou/orgs","repos_url":"https://api.github.com/users/esarafianou/repos","events_url":"https://api.github.com/users/esarafianou/events{/privacy}","received_events_url":"https://api.github.com/users/esarafianou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/esarafianou/harmonise.it","description":"Practice music theory harmony rules  online","fork":false,"url":"https://api.github.com/repos/esarafianou/harmonise.it","forks_url":"https://api.github.com/repos/esarafianou/harmonise.it/forks","keys_url":"https://api.github.com/repos/esarafianou/harmonise.it/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esarafianou/harmonise.it/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esarafianou/harmonise.it/teams","hooks_url":"https://api.github.com/repos/esarafianou/harmonise.it/hooks","issue_events_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/events{/number}","events_url":"https://api.github.com/repos/esarafianou/harmonise.it/events","assignees_url":"https://api.github.com/repos/esarafianou/harmonise.it/assignees{/user}","branches_url":"https://api.github.com/repos/esarafianou/harmonise.it/branches{/branch}","tags_url":"https://api.github.com/repos/esarafianou/harmonise.it/tags","blobs_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/refs{/sha}","trees_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esarafianou/harmonise.it/statuses/{sha}","languages_url":"https://api.github.com/repos/esarafianou/harmonise.it/languages","stargazers_url":"https://api.github.com/repos/esarafianou/harmonise.it/stargazers","contributors_url":"https://api.github.com/repos/esarafianou/harmonise.it/contributors","subscribers_url":"https://api.github.com/repos/esarafianou/harmonise.it/subscribers","subscription_url":"https://api.github.com/repos/esarafianou/harmonise.it/subscription","commits_url":"https://api.github.com/repos/esarafianou/harmonise.it/commits{/sha}","git_commits_url":"https://api.github.com/repos/esarafianou/harmonise.it/git/commits{/sha}","comments_url":"https://api.github.com/repos/esarafianou/harmonise.it/comments{/number}","issue_comment_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues/comments{/number}","contents_url":"https://api.github.com/repos/esarafianou/harmonise.it/contents/{+path}","compare_url":"https://api.github.com/repos/esarafianou/harmonise.it/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esarafianou/harmonise.it/merges","archive_url":"https://api.github.com/repos/esarafianou/harmonise.it/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esarafianou/harmonise.it/downloads","issues_url":"https://api.github.com/repos/esarafianou/harmonise.it/issues{/number}","pulls_url":"https://api.github.com/repos/esarafianou/harmonise.it/pulls{/number}","milestones_url":"https://api.github.com/repos/esarafianou/harmonise.it/milestones{/number}","notifications_url":"https://api.github.com/repos/esarafianou/harmonise.it/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esarafianou/harmonise.it/labels{/name}","releases_url":"https://api.github.com/repos/esarafianou/harmonise.it/releases{/id}","deployments_url":"https://api.github.com/repos/esarafianou/harmonise.it/deployments","created_at":"2017-07-27T23:15:37Z","updated_at":"2018-01-24T13:28:02Z","pushed_at":"2018-02-27T12:51:31Z","git_url":"git://github.com/esarafianou/harmonise.it.git","ssh_url":"git@github.com:esarafianou/harmonise.it.git","clone_url":"https://github.com/esarafianou/harmonise.it.git","svn_url":"https://github.com/esarafianou/harmonise.it","homepage":"","size":277,"stargazers_count":1,"watchers_count":1,"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":1,"license":null,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9"},"html":{"href":"https://github.com/esarafianou/harmonise.it/pull/9"},"issue":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/issues/9"},"comments":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/esarafianou/harmonise.it/statuses/3b72806fa8b824aa15ca6954218a282201207222"}},"author_association":"OWNER"}}
{"actor":{"display_login":"petrosagg"}}