{"action":"opened","number":69,"pull_request":{"url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69","id":232107632,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMTA3NjMy","html_url":"https://github.com/andela/valinor-ah-backend/pull/69","diff_url":"https://github.com/andela/valinor-ah-backend/pull/69.diff","patch_url":"https://github.com/andela/valinor-ah-backend/pull/69.patch","issue_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/69","number":69,"state":"open","locked":false,"title":"#162030155 Implement route to fetch all categories","user":{"login":"Darthrighteous","id":31810086,"node_id":"MDQ6VXNlcjMxODEwMDg2","avatar_url":"https://avatars2.githubusercontent.com/u/31810086?v=4","gravatar_id":"","url":"https://api.github.com/users/Darthrighteous","html_url":"https://github.com/Darthrighteous","followers_url":"https://api.github.com/users/Darthrighteous/followers","following_url":"https://api.github.com/users/Darthrighteous/following{/other_user}","gists_url":"https://api.github.com/users/Darthrighteous/gists{/gist_id}","starred_url":"https://api.github.com/users/Darthrighteous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Darthrighteous/subscriptions","organizations_url":"https://api.github.com/users/Darthrighteous/orgs","repos_url":"https://api.github.com/users/Darthrighteous/repos","events_url":"https://api.github.com/users/Darthrighteous/events{/privacy}","received_events_url":"https://api.github.com/users/Darthrighteous/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nBuild the endpoint to get all categories in the database\r\n\r\n#### Description of Task to be completed?\r\n- add the endpoint to get all categories `/api/v1/articles/categories`\r\n- update the create article controller to add categories that don't exist to the category table\r\n\r\n#### How should this be manually tested?\r\n- clone the repository, cd into it, checkout this branch `feature/162030155/get-all-categories`\r\n- set up your .env variables and local database\r\n- run `npm install` to install required packages\r\n- run `npm start` to start up the server\r\n- use postman(or any api testing tool) to test the route\r\n- get all categories `GET http://localhost:3000/api/v1/articles/categories`\r\n\r\n\r\n#### Any background context you want to provide?\r\nN/A\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n\r\n#### Screenshots (if appropriate)\r\n<img width=\"630\" alt=\"screen shot 2018-11-19 at 5 30 45 pm\" src=\"https://user-images.githubusercontent.com/31810086/48733829-032cd080-ec44-11e8-8d8f-07426c3c90c8.png\">\r\n\r\n#### Questions:\r\nN/A","created_at":"2018-11-19T20:50:57Z","updated_at":"2018-11-19T20:50:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69/commits","review_comments_url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69/comments","review_comment_url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/69/comments","statuses_url":"https://api.github.com/repos/andela/valinor-ah-backend/statuses/55a58400e0eeca10abdfb679bd8229712e74ff55","head":{"label":"andela:feature/162030155/get-all-categories","ref":"feature/162030155/get-all-categories","sha":"55a58400e0eeca10abdfb679bd8229712e74ff55","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":153471282,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM0NzEyODI=","name":"valinor-ah-backend","full_name":"andela/valinor-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/valinor-ah-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/valinor-ah-backend","forks_url":"https://api.github.com/repos/andela/valinor-ah-backend/forks","keys_url":"https://api.github.com/repos/andela/valinor-ah-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/valinor-ah-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/valinor-ah-backend/teams","hooks_url":"https://api.github.com/repos/andela/valinor-ah-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/valinor-ah-backend/events","assignees_url":"https://api.github.com/repos/andela/valinor-ah-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/valinor-ah-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/valinor-ah-backend/tags","blobs_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/valinor-ah-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/valinor-ah-backend/languages","stargazers_url":"https://api.github.com/repos/andela/valinor-ah-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/valinor-ah-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/valinor-ah-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/valinor-ah-backend/subscription","commits_url":"https://api.github.com/repos/andela/valinor-ah-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/valinor-ah-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/valinor-ah-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/valinor-ah-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/valinor-ah-backend/merges","archive_url":"https://api.github.com/repos/andela/valinor-ah-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/valinor-ah-backend/downloads","issues_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/valinor-ah-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/valinor-ah-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/valinor-ah-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/valinor-ah-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/valinor-ah-backend/deployments","created_at":"2018-10-17T14:29:52Z","updated_at":"2018-11-12T15:35:44Z","pushed_at":"2018-11-19T20:27:36Z","git_url":"git://github.com/andela/valinor-ah-backend.git","ssh_url":"git@github.com:andela/valinor-ah-backend.git","clone_url":"https://github.com/andela/valinor-ah-backend.git","svn_url":"https://github.com/andela/valinor-ah-backend","homepage":null,"size":442,"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":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"andela:develop","ref":"develop","sha":"9680f8c0306bd5915c6109852fc84df4d32e2041","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":153471282,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM0NzEyODI=","name":"valinor-ah-backend","full_name":"andela/valinor-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/valinor-ah-backend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/valinor-ah-backend","forks_url":"https://api.github.com/repos/andela/valinor-ah-backend/forks","keys_url":"https://api.github.com/repos/andela/valinor-ah-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/valinor-ah-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/valinor-ah-backend/teams","hooks_url":"https://api.github.com/repos/andela/valinor-ah-backend/hooks","issue_events_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/valinor-ah-backend/events","assignees_url":"https://api.github.com/repos/andela/valinor-ah-backend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/valinor-ah-backend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/valinor-ah-backend/tags","blobs_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/valinor-ah-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/valinor-ah-backend/languages","stargazers_url":"https://api.github.com/repos/andela/valinor-ah-backend/stargazers","contributors_url":"https://api.github.com/repos/andela/valinor-ah-backend/contributors","subscribers_url":"https://api.github.com/repos/andela/valinor-ah-backend/subscribers","subscription_url":"https://api.github.com/repos/andela/valinor-ah-backend/subscription","commits_url":"https://api.github.com/repos/andela/valinor-ah-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/valinor-ah-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/valinor-ah-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/valinor-ah-backend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/valinor-ah-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/valinor-ah-backend/merges","archive_url":"https://api.github.com/repos/andela/valinor-ah-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/valinor-ah-backend/downloads","issues_url":"https://api.github.com/repos/andela/valinor-ah-backend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/valinor-ah-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/valinor-ah-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/valinor-ah-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/valinor-ah-backend/labels{/name}","releases_url":"https://api.github.com/repos/andela/valinor-ah-backend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/valinor-ah-backend/deployments","created_at":"2018-10-17T14:29:52Z","updated_at":"2018-11-12T15:35:44Z","pushed_at":"2018-11-19T20:27:36Z","git_url":"git://github.com/andela/valinor-ah-backend.git","ssh_url":"git@github.com:andela/valinor-ah-backend.git","clone_url":"https://github.com/andela/valinor-ah-backend.git","svn_url":"https://github.com/andela/valinor-ah-backend","homepage":null,"size":442,"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":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69"},"html":{"href":"https://github.com/andela/valinor-ah-backend/pull/69"},"issue":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/issues/69"},"comments":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/andela/valinor-ah-backend/statuses/55a58400e0eeca10abdfb679bd8229712e74ff55"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":300,"deletions":181,"changed_files":10}}
{"actor":{"display_login":"Darthrighteous"}}