{"action":"created","comment":{"url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/comments/230020901","pull_request_review_id":170657433,"id":230020901,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDAyMDkwMQ==","diff_hunk":"@@ -0,0 +1,17 @@\n+import mockUser from '../../helpers/seedData/users.json';\n+\n+export default {\n+  up: (queryInterface, Sequelize) => { queryInterface.bulkInsert('User', [], {});\n+    \n+  },","path":"server/src/db/seeders/20181029220222-demo-user.js","position":6,"original_position":6,"commit_id":"0fa7e2f831ce134b42559aec3dd024ce64b7fd16","original_commit_id":"0fa7e2f831ce134b42559aec3dd024ce64b7fd16","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Block must not be padded by blank lines                  padded-blocks","created_at":"2018-11-01T12:07:16Z","updated_at":"2018-11-01T12:07:17Z","html_url":"https://github.com/andela/noldor-ah-backend/pull/13#discussion_r230020901","pull_request_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/comments/230020901"},"html":{"href":"https://github.com/andela/noldor-ah-backend/pull/13#discussion_r230020901"},"pull_request":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13","id":227598149,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NTk4MTQ5","html_url":"https://github.com/andela/noldor-ah-backend/pull/13","diff_url":"https://github.com/andela/noldor-ah-backend/pull/13.diff","patch_url":"https://github.com/andela/noldor-ah-backend/pull/13.patch","issue_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/13","number":13,"state":"open","locked":false,"title":"Feature/161290903/crud operations for articles","user":{"login":"uwaelpis","id":42223360,"node_id":"MDQ6VXNlcjQyMjIzMzYw","avatar_url":"https://avatars2.githubusercontent.com/u/42223360?v=4","gravatar_id":"","url":"https://api.github.com/users/uwaelpis","html_url":"https://github.com/uwaelpis","followers_url":"https://api.github.com/users/uwaelpis/followers","following_url":"https://api.github.com/users/uwaelpis/following{/other_user}","gists_url":"https://api.github.com/users/uwaelpis/gists{/gist_id}","starred_url":"https://api.github.com/users/uwaelpis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwaelpis/subscriptions","organizations_url":"https://api.github.com/users/uwaelpis/orgs","repos_url":"https://api.github.com/users/uwaelpis/repos","events_url":"https://api.github.com/users/uwaelpis/events{/privacy}","received_events_url":"https://api.github.com/users/uwaelpis/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n- Allows any user to view all articles and specific articles \r\n- Allows authenticated users  to view, create, edit and delete articles \r\n#### Description of Task to be completed?\r\n- created migration and model for articles with associations\r\n- wrote validations for request.body of articles.\r\n- wrote test with 100% coverage of article controller branches\r\n- installed slug dependency package and created a set function to merge user uuid and title slug\r\n- **GET** `api/articles` *unprotected* - it fetches all published articles \r\n- **GET** `api/articles/drafts` *protected* - it fetches all drafts by the authenticated user\r\n- **GET**  `api/users/articles` *protected* - it fetches all published article by the authenticated user\r\n- **GET** `api/articles/:slug` *unprotected* - it fetches an article with slug parameter\r\n- **POST** `api/articles` *protected* - it creates an article\r\n- **PUT** `api/articles/:slug/publish` *protected* - it allows only author to publish article.\r\n- **PUT** `api/articles/:slug` *protected* - it allows authors to edit their articles whether published or draft\r\n- **DELETE** `api/articles/:slug` *protected* - it allows authors to delete their own articles.\r\n\r\n#### How should this be manually tested?\r\n- clone this [repository](https://github.com/andela/noldor-ah-backend)\r\n- run npm install on command line\r\n- create postgres database \r\n- create .env file \r\n- set up environment variables using the sample on .envsample file\r\n- Run `npm run dev` on command/shell\r\n- Using [postman](https://www.getpostman.com/) test the endpoint with prefix- `localhost:3000`\r\n\r\n#### Any background context you want to provide?\r\n- Some of the endpoints are protected so you will need to sign up with `users/register` \r\n#### What are the relevant pivotal tracker stories?\r\n#161290903\r\n#### Screenshots (if appropriate)\r\n#### Questions:","created_at":"2018-11-01T12:06:54Z","updated_at":"2018-11-01T12:07:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1eb2ed50b9bd9eee717a76308a71b9ddb5e4171","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13/commits","review_comments_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13/comments","review_comment_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/13/comments","statuses_url":"https://api.github.com/repos/andela/noldor-ah-backend/statuses/0fa7e2f831ce134b42559aec3dd024ce64b7fd16","head":{"label":"andela:feature/161290903/CRUD-operations-for-articles","ref":"feature/161290903/CRUD-operations-for-articles","sha":"0fa7e2f831ce134b42559aec3dd024ce64b7fd16","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":153471144,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM0NzExNDQ=","name":"noldor-ah-backend","full_name":"andela/noldor-ah-backend","private":false,"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},"html_url":"https://github.com/andela/noldor-ah-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/noldor-ah-backend","forks_url":"https://api.github.com/repos/andela/noldor-ah-backend/forks","keys_url":"https://api.github.com/repos/andela/noldor-ah-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/noldor-ah-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/noldor-ah-backend/teams","hooks_url":"https://api.github.com/repos/andela/noldor-ah-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/noldor-ah-backend/events","assignees_url":"https://api.github.com/repos/andela/noldor-ah-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/noldor-ah-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/noldor-ah-backend/tags","blobs_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/noldor-ah-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/noldor-ah-backend/languages","stargazers_url":"https://api.github.com/repos/andela/noldor-ah-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/noldor-ah-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/noldor-ah-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/noldor-ah-backend/subscription","commits_url":"https://api.github.com/repos/andela/noldor-ah-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/noldor-ah-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/noldor-ah-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/noldor-ah-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/noldor-ah-backend/merges","archive_url":"https://api.github.com/repos/andela/noldor-ah-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/noldor-ah-backend/downloads","issues_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/noldor-ah-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/noldor-ah-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/noldor-ah-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/noldor-ah-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/noldor-ah-backend/deployments","created_at":"2018-10-17T14:29:05Z","updated_at":"2018-10-26T11:36:41Z","pushed_at":"2018-11-01T12:06:55Z","git_url":"git://github.com/andela/noldor-ah-backend.git","ssh_url":"git@github.com:andela/noldor-ah-backend.git","clone_url":"https://github.com/andela/noldor-ah-backend.git","svn_url":"https://github.com/andela/noldor-ah-backend","homepage":null,"size":477,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"andela:develop","ref":"develop","sha":"8b3a62c1626d86c8a96b19af3d34543211ef3129","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":153471144,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM0NzExNDQ=","name":"noldor-ah-backend","full_name":"andela/noldor-ah-backend","private":false,"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},"html_url":"https://github.com/andela/noldor-ah-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/noldor-ah-backend","forks_url":"https://api.github.com/repos/andela/noldor-ah-backend/forks","keys_url":"https://api.github.com/repos/andela/noldor-ah-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/noldor-ah-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/noldor-ah-backend/teams","hooks_url":"https://api.github.com/repos/andela/noldor-ah-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/noldor-ah-backend/events","assignees_url":"https://api.github.com/repos/andela/noldor-ah-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/noldor-ah-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/noldor-ah-backend/tags","blobs_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/noldor-ah-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/noldor-ah-backend/languages","stargazers_url":"https://api.github.com/repos/andela/noldor-ah-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/noldor-ah-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/noldor-ah-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/noldor-ah-backend/subscription","commits_url":"https://api.github.com/repos/andela/noldor-ah-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/noldor-ah-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/noldor-ah-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/noldor-ah-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/noldor-ah-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/noldor-ah-backend/merges","archive_url":"https://api.github.com/repos/andela/noldor-ah-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/noldor-ah-backend/downloads","issues_url":"https://api.github.com/repos/andela/noldor-ah-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/noldor-ah-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/noldor-ah-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/noldor-ah-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/noldor-ah-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/noldor-ah-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/noldor-ah-backend/deployments","created_at":"2018-10-17T14:29:05Z","updated_at":"2018-10-26T11:36:41Z","pushed_at":"2018-11-01T12:06:55Z","git_url":"git://github.com/andela/noldor-ah-backend.git","ssh_url":"git@github.com:andela/noldor-ah-backend.git","clone_url":"https://github.com/andela/noldor-ah-backend.git","svn_url":"https://github.com/andela/noldor-ah-backend","homepage":null,"size":477,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13"},"html":{"href":"https://github.com/andela/noldor-ah-backend/pull/13"},"issue":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/issues/13"},"comments":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/andela/noldor-ah-backend/statuses/0fa7e2f831ce134b42559aec3dd024ce64b7fd16"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}