{"action":"created","comment":{"url":"https://api.github.com/repos/andela/elven-ah/pulls/comments/213272009","pull_request_review_id":150072388,"id":213272009,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzI3MjAwOQ==","diff_hunk":"@@ -56,8 +56,8 @@ describe('User signup', () => {\n   it('should activate the user if inactivated, and valid token supplied', (done) => {","path":"server/tests/1userSignup.test.js","position":1,"original_position":1,"commit_id":"67715558287789970d2013c04381e4c05bed88dc","original_commit_id":"12e0b58e590e5b967449ebf6aeab8538bbf2d61a","user":{"login":"Veraclins","id":26969309,"node_id":"MDQ6VXNlcjI2OTY5MzA5","avatar_url":"https://avatars3.githubusercontent.com/u/26969309?v=4","gravatar_id":"","url":"https://api.github.com/users/Veraclins","html_url":"https://github.com/Veraclins","followers_url":"https://api.github.com/users/Veraclins/followers","following_url":"https://api.github.com/users/Veraclins/following{/other_user}","gists_url":"https://api.github.com/users/Veraclins/gists{/gist_id}","starred_url":"https://api.github.com/users/Veraclins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Veraclins/subscriptions","organizations_url":"https://api.github.com/users/Veraclins/orgs","repos_url":"https://api.github.com/users/Veraclins/repos","events_url":"https://api.github.com/users/Veraclins/events{/privacy}","received_events_url":"https://api.github.com/users/Veraclins/received_events","type":"User","site_admin":false},"body":"@Oluwafayokemi Thanks for your feedback. I have implemented your feedback that requires changes. As for the refactoring, I figured since implementing the notification had us already touching so many files, adding that will be a bonus as it helped improve our test coverage considerably.","created_at":"2018-08-28T11:13:25Z","updated_at":"2018-08-28T11:13:25Z","html_url":"https://github.com/andela/elven-ah/pull/27#discussion_r213272009","pull_request_url":"https://api.github.com/repos/andela/elven-ah/pulls/27","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/comments/213272009"},"html":{"href":"https://github.com/andela/elven-ah/pull/27#discussion_r213272009"},"pull_request":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/27"}},"in_reply_to_id":213267646},"pull_request":{"url":"https://api.github.com/repos/andela/elven-ah/pulls/27","id":211167701,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMTY3NzAx","html_url":"https://github.com/andela/elven-ah/pull/27","diff_url":"https://github.com/andela/elven-ah/pull/27.diff","patch_url":"https://github.com/andela/elven-ah/pull/27.patch","issue_url":"https://api.github.com/repos/andela/elven-ah/issues/27","number":27,"state":"open","locked":false,"title":"#159204726 Send notifications on article and user activities","user":{"login":"Veraclins","id":26969309,"node_id":"MDQ6VXNlcjI2OTY5MzA5","avatar_url":"https://avatars3.githubusercontent.com/u/26969309?v=4","gravatar_id":"","url":"https://api.github.com/users/Veraclins","html_url":"https://github.com/Veraclins","followers_url":"https://api.github.com/users/Veraclins/followers","following_url":"https://api.github.com/users/Veraclins/following{/other_user}","gists_url":"https://api.github.com/users/Veraclins/gists{/gist_id}","starred_url":"https://api.github.com/users/Veraclins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Veraclins/subscriptions","organizations_url":"https://api.github.com/users/Veraclins/orgs","repos_url":"https://api.github.com/users/Veraclins/repos","events_url":"https://api.github.com/users/Veraclins/events{/privacy}","received_events_url":"https://api.github.com/users/Veraclins/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nAdd ability for users to notification when there is an activity on an article they have interacted with, when there is an activity on their article and when another user follows them.\r\n#### Description of Task to be completed?\r\n- Create Channel, Subscription and Notification\r\n- Create Channel, Subscription and Notification migrations\r\n- create Notification controller\r\n- add methods for subscribing to and sending notification\r\n- add create a user channel on signup\r\n- add delete an article channel when the article is deleted\r\n- add unsubscribe method to unsubscribe from a notification\r\n- add public folder with a sample implementation of notification on the frontend\r\n\r\n#### How should this be manually tested?\r\n- Clone the repo: Run `git clone https://github.com/andela/elven-ah.git` in the folder where you want the repo to be saved.\r\n- Navigate into the newly created folder and install the dependencies: `cd elven-ah && npm install`\r\n- Copy .env.example to .env: `cp .env.example .env`\r\n- Provision a PostgreSQL database and add the credentials to the .env file. \r\n- Start the server using `npm start`\r\n- create an account  and create an article or seed some articles\r\n- Open http://localhost:3000 in a browser and log in with any of the seeded users\r\n- Then using postman comment/rate articles with the token of the user logged in above\r\n- comment on the same article with other users' tokens and notice the alerts on the frontend\r\n#### What are the relevant pivotal tracker stories? \r\n[#159204726](https://www.pivotaltracker.com/story/show/159204726)","created_at":"2018-08-27T16:54:30Z","updated_at":"2018-08-28T11:13:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcbb37f99b126621bb4766db57997a8afdffcc19","assignee":null,"assignees":[],"requested_reviewers":[{"login":"yomigeek","id":5827585,"node_id":"MDQ6VXNlcjU4Mjc1ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/5827585?v=4","gravatar_id":"","url":"https://api.github.com/users/yomigeek","html_url":"https://github.com/yomigeek","followers_url":"https://api.github.com/users/yomigeek/followers","following_url":"https://api.github.com/users/yomigeek/following{/other_user}","gists_url":"https://api.github.com/users/yomigeek/gists{/gist_id}","starred_url":"https://api.github.com/users/yomigeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yomigeek/subscriptions","organizations_url":"https://api.github.com/users/yomigeek/orgs","repos_url":"https://api.github.com/users/yomigeek/repos","events_url":"https://api.github.com/users/yomigeek/events{/privacy}","received_events_url":"https://api.github.com/users/yomigeek/received_events","type":"User","site_admin":false},{"login":"tonymontaro","id":26271203,"node_id":"MDQ6VXNlcjI2MjcxMjAz","avatar_url":"https://avatars3.githubusercontent.com/u/26271203?v=4","gravatar_id":"","url":"https://api.github.com/users/tonymontaro","html_url":"https://github.com/tonymontaro","followers_url":"https://api.github.com/users/tonymontaro/followers","following_url":"https://api.github.com/users/tonymontaro/following{/other_user}","gists_url":"https://api.github.com/users/tonymontaro/gists{/gist_id}","starred_url":"https://api.github.com/users/tonymontaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonymontaro/subscriptions","organizations_url":"https://api.github.com/users/tonymontaro/orgs","repos_url":"https://api.github.com/users/tonymontaro/repos","events_url":"https://api.github.com/users/tonymontaro/events{/privacy}","received_events_url":"https://api.github.com/users/tonymontaro/received_events","type":"User","site_admin":false},{"login":"chukwuemekachm","id":33798252,"node_id":"MDQ6VXNlcjMzNzk4MjUy","avatar_url":"https://avatars0.githubusercontent.com/u/33798252?v=4","gravatar_id":"","url":"https://api.github.com/users/chukwuemekachm","html_url":"https://github.com/chukwuemekachm","followers_url":"https://api.github.com/users/chukwuemekachm/followers","following_url":"https://api.github.com/users/chukwuemekachm/following{/other_user}","gists_url":"https://api.github.com/users/chukwuemekachm/gists{/gist_id}","starred_url":"https://api.github.com/users/chukwuemekachm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chukwuemekachm/subscriptions","organizations_url":"https://api.github.com/users/chukwuemekachm/orgs","repos_url":"https://api.github.com/users/chukwuemekachm/repos","events_url":"https://api.github.com/users/chukwuemekachm/events{/privacy}","received_events_url":"https://api.github.com/users/chukwuemekachm/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/elven-ah/pulls/27/commits","review_comments_url":"https://api.github.com/repos/andela/elven-ah/pulls/27/comments","review_comment_url":"https://api.github.com/repos/andela/elven-ah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/elven-ah/issues/27/comments","statuses_url":"https://api.github.com/repos/andela/elven-ah/statuses/67715558287789970d2013c04381e4c05bed88dc","head":{"label":"andela:feature/159204726/notifications-on-article-activities","ref":"feature/159204726/notifications-on-article-activities","sha":"67715558287789970d2013c04381e4c05bed88dc","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":141551482,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1NTE0ODI=","name":"elven-ah","full_name":"andela/elven-ah","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/elven-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/elven-ah","forks_url":"https://api.github.com/repos/andela/elven-ah/forks","keys_url":"https://api.github.com/repos/andela/elven-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/elven-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/elven-ah/teams","hooks_url":"https://api.github.com/repos/andela/elven-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/elven-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/elven-ah/events","assignees_url":"https://api.github.com/repos/andela/elven-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/elven-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/elven-ah/tags","blobs_url":"https://api.github.com/repos/andela/elven-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/elven-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/elven-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/elven-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/elven-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/elven-ah/languages","stargazers_url":"https://api.github.com/repos/andela/elven-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/elven-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/elven-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/elven-ah/subscription","commits_url":"https://api.github.com/repos/andela/elven-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/elven-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/elven-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/elven-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/elven-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/elven-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/elven-ah/merges","archive_url":"https://api.github.com/repos/andela/elven-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/elven-ah/downloads","issues_url":"https://api.github.com/repos/andela/elven-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/elven-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/elven-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/elven-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/elven-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/elven-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/elven-ah/deployments","created_at":"2018-07-19T08:52:52Z","updated_at":"2018-08-27T09:51:18Z","pushed_at":"2018-08-28T11:09:25Z","git_url":"git://github.com/andela/elven-ah.git","ssh_url":"git@github.com:andela/elven-ah.git","clone_url":"https://github.com/andela/elven-ah.git","svn_url":"https://github.com/andela/elven-ah","homepage":null,"size":975,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"staging"}},"base":{"label":"andela:staging","ref":"staging","sha":"d749c51db7372c1b8e2cd6c4e991aefbd1140594","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":141551482,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1NTE0ODI=","name":"elven-ah","full_name":"andela/elven-ah","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/elven-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/elven-ah","forks_url":"https://api.github.com/repos/andela/elven-ah/forks","keys_url":"https://api.github.com/repos/andela/elven-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/elven-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/elven-ah/teams","hooks_url":"https://api.github.com/repos/andela/elven-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/elven-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/elven-ah/events","assignees_url":"https://api.github.com/repos/andela/elven-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/elven-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/elven-ah/tags","blobs_url":"https://api.github.com/repos/andela/elven-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/elven-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/elven-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/elven-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/elven-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/elven-ah/languages","stargazers_url":"https://api.github.com/repos/andela/elven-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/elven-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/elven-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/elven-ah/subscription","commits_url":"https://api.github.com/repos/andela/elven-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/elven-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/elven-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/elven-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/elven-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/elven-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/elven-ah/merges","archive_url":"https://api.github.com/repos/andela/elven-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/elven-ah/downloads","issues_url":"https://api.github.com/repos/andela/elven-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/elven-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/elven-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/elven-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/elven-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/elven-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/elven-ah/deployments","created_at":"2018-07-19T08:52:52Z","updated_at":"2018-08-27T09:51:18Z","pushed_at":"2018-08-28T11:09:25Z","git_url":"git://github.com/andela/elven-ah.git","ssh_url":"git@github.com:andela/elven-ah.git","clone_url":"https://github.com/andela/elven-ah.git","svn_url":"https://github.com/andela/elven-ah","homepage":null,"size":975,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/27"},"html":{"href":"https://github.com/andela/elven-ah/pull/27"},"issue":{"href":"https://api.github.com/repos/andela/elven-ah/issues/27"},"comments":{"href":"https://api.github.com/repos/andela/elven-ah/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/elven-ah/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/andela/elven-ah/statuses/67715558287789970d2013c04381e4c05bed88dc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Veraclins"}}