{"action":"created","comment":{"url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/comments/198698698","pull_request_review_id":132675861,"id":198698698,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODY5ODY5OA==","diff_hunk":"@@ -0,0 +1,34 @@\n+import axios from 'axios';\n+import constants from '../_constants';\n+\n+// constants\n+const {\n+  LOAD_INCIDENCE_REPORTS_SUCCESS,\n+  LOAD_INCIDENCE_REPORTS_FAILURE,\n+  LOAD_INCIDENCE_REPORTS_START,\n+} = constants;\n+\n+/**\n+ * Load incidence reports success\n+ *\n+ * @param {array} incidenceReports\n+ * @return {object} type and payload\n+ */\n+export const loadIncidenceReportsSuccess = incidenceReports => (\n+  { type: LOAD_INCIDENCE_REPORTS_SUCCESS, incidenceReports }\n+);\n+\n+/**\n+ * Incidence reports thunk\n+ *\n+ * @return {(dispatch:any)=>Promise<TResult2|TResult1>}\n+ */\n+export const loadIncidenceReports = (page = 1, limit = 10) =>\n+  (dispatch) => {\n+    dispatch({ type: LOAD_INCIDENCE_REPORTS_START });\n+    return axios.get('http://art-backend.herokuapp.com/api/v1/incidence-reports/')","path":"src/_actions/incidenceReports.actions.js","position":29,"original_position":29,"commit_id":"3432a833ab6939cdf285895a8f7c33e7060d79c4","original_commit_id":"3432a833ab6939cdf285895a8f7c33e7060d79c4","user":{"login":"sachungo","id":12892171,"node_id":"MDQ6VXNlcjEyODkyMTcx","avatar_url":"https://avatars0.githubusercontent.com/u/12892171?v=4","gravatar_id":"","url":"https://api.github.com/users/sachungo","html_url":"https://github.com/sachungo","followers_url":"https://api.github.com/users/sachungo/followers","following_url":"https://api.github.com/users/sachungo/following{/other_user}","gists_url":"https://api.github.com/users/sachungo/gists{/gist_id}","starred_url":"https://api.github.com/users/sachungo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sachungo/subscriptions","organizations_url":"https://api.github.com/users/sachungo/orgs","repos_url":"https://api.github.com/users/sachungo/repos","events_url":"https://api.github.com/users/sachungo/events{/privacy}","received_events_url":"https://api.github.com/users/sachungo/received_events","type":"User","site_admin":false},"body":"This should be `axios.get('incidence-reports')`. The API URL is supposed to be declared in your `.env` as `REACT_APP_API_URL`. Read [this slack message](https://andela.slack.com/archives/GAMEXMPFV/p1528813884000969)","created_at":"2018-06-28T03:24:32Z","updated_at":"2018-06-28T03:36:34Z","html_url":"https://github.com/AndelaOSP/art-dashboard/pull/59#discussion_r198698698","pull_request_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/comments/198698698"},"html":{"href":"https://github.com/AndelaOSP/art-dashboard/pull/59#discussion_r198698698"},"pull_request":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59","id":197811572,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3ODExNTcy","html_url":"https://github.com/AndelaOSP/art-dashboard/pull/59","diff_url":"https://github.com/AndelaOSP/art-dashboard/pull/59.diff","patch_url":"https://github.com/AndelaOSP/art-dashboard/pull/59.patch","issue_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/59","number":59,"state":"open","locked":false,"title":"feature(incidence-reports): fetch all incidence reports","user":{"login":"kimotho-njoki","id":31322228,"node_id":"MDQ6VXNlcjMxMzIyMjI4","avatar_url":"https://avatars3.githubusercontent.com/u/31322228?v=4","gravatar_id":"","url":"https://api.github.com/users/kimotho-njoki","html_url":"https://github.com/kimotho-njoki","followers_url":"https://api.github.com/users/kimotho-njoki/followers","following_url":"https://api.github.com/users/kimotho-njoki/following{/other_user}","gists_url":"https://api.github.com/users/kimotho-njoki/gists{/gist_id}","starred_url":"https://api.github.com/users/kimotho-njoki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimotho-njoki/subscriptions","organizations_url":"https://api.github.com/users/kimotho-njoki/orgs","repos_url":"https://api.github.com/users/kimotho-njoki/repos","events_url":"https://api.github.com/users/kimotho-njoki/events{/privacy}","received_events_url":"https://api.github.com/users/kimotho-njoki/received_events","type":"User","site_admin":false},"body":"## What does this PR do?\r\nThis PR fetches all incidence reports from the API and makes it possible to view all reports using the link option on the Side Menu.\r\n\r\n## Description of Task to be completed?\r\n- Use the ART Backend API endpoint to show all incidence reports\r\n- AS a USER\r\n   WHEN I click on the incidence report link on the sidemenu\r\n    - It should fetch all incident reports from the backend and display paginated results in a table\r\n  \r\n## How should this be manually tested?\r\n- Pull the branch and click on `reports` on the Side Menu.\r\n\r\n## What are the relevant pivotal tracker stories?\r\n[158492395](https://www.pivotaltracker.com/n/projects/2146417/stories/158492395)\r\n\r\n## Any background context you want to add?\r\nN/A \r\n\r\n## Important notes\r\nN/A\r\n\r\n## Packages installed\r\nN/A\r\n\r\n## Deployment note\r\nN/A\r\n\r\n## Related PRs branch | PR (branch_name) | (pr_link)\r\nBranch | PR\r\n------ | ------\r\nother_pr_production | [link]()\r\nother_pr_master | [link]()\r\n## Todos\r\n- [x] Raise PR\r\n- [ ] Test\r\n- [ ] Documentation\r\n## Screenshots\r\n![screen shot 2018-06-27 at 21 02 55](https://user-images.githubusercontent.com/31322228/41991494-42e7fe2e-7a4e-11e8-8941-9b53a682d9f0.png)\r\n","created_at":"2018-06-27T18:09:38Z","updated_at":"2018-06-28T03:36:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"167affe3238124684ae6ed37e4b0701521f4ac7b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59/commits","review_comments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59/comments","review_comment_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/59/comments","statuses_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/statuses/3432a833ab6939cdf285895a8f7c33e7060d79c4","head":{"label":"AndelaOSP:ft-incidence-reports-158492395","ref":"ft-incidence-reports-158492395","sha":"3432a833ab6939cdf285895a8f7c33e7060d79c4","user":{"login":"AndelaOSP","id":22083364,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDgzMzY0","avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"repo":{"id":121240728,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEyNDA3Mjg=","name":"art-dashboard","full_name":"AndelaOSP/art-dashboard","owner":{"login":"AndelaOSP","id":22083364,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDgzMzY0","avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AndelaOSP/art-dashboard","description":"This is the admin dashboard for the ART application","fork":false,"url":"https://api.github.com/repos/AndelaOSP/art-dashboard","forks_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/forks","keys_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/teams","hooks_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/hooks","issue_events_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/events","assignees_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/tags","blobs_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/languages","stargazers_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/stargazers","contributors_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/contributors","subscribers_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/subscribers","subscription_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/subscription","commits_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/merges","archive_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/downloads","issues_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/deployments","created_at":"2018-02-12T11:52:48Z","updated_at":"2018-06-27T12:24:04Z","pushed_at":"2018-06-27T22:56:38Z","git_url":"git://github.com/AndelaOSP/art-dashboard.git","ssh_url":"git@github.com:AndelaOSP/art-dashboard.git","clone_url":"https://github.com/AndelaOSP/art-dashboard.git","svn_url":"https://github.com/AndelaOSP/art-dashboard","homepage":null,"size":3039,"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":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"develop"}},"base":{"label":"AndelaOSP:develop","ref":"develop","sha":"5324c816d22bb35207a1bf6187caf0e1277e96be","user":{"login":"AndelaOSP","id":22083364,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDgzMzY0","avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"repo":{"id":121240728,"node_id":"MDEwOlJlcG9zaXRvcnkxMjEyNDA3Mjg=","name":"art-dashboard","full_name":"AndelaOSP/art-dashboard","owner":{"login":"AndelaOSP","id":22083364,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMDgzMzY0","avatar_url":"https://avatars1.githubusercontent.com/u/22083364?v=4","gravatar_id":"","url":"https://api.github.com/users/AndelaOSP","html_url":"https://github.com/AndelaOSP","followers_url":"https://api.github.com/users/AndelaOSP/followers","following_url":"https://api.github.com/users/AndelaOSP/following{/other_user}","gists_url":"https://api.github.com/users/AndelaOSP/gists{/gist_id}","starred_url":"https://api.github.com/users/AndelaOSP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndelaOSP/subscriptions","organizations_url":"https://api.github.com/users/AndelaOSP/orgs","repos_url":"https://api.github.com/users/AndelaOSP/repos","events_url":"https://api.github.com/users/AndelaOSP/events{/privacy}","received_events_url":"https://api.github.com/users/AndelaOSP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AndelaOSP/art-dashboard","description":"This is the admin dashboard for the ART application","fork":false,"url":"https://api.github.com/repos/AndelaOSP/art-dashboard","forks_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/forks","keys_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/teams","hooks_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/hooks","issue_events_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/events","assignees_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/tags","blobs_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/languages","stargazers_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/stargazers","contributors_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/contributors","subscribers_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/subscribers","subscription_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/subscription","commits_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/merges","archive_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/downloads","issues_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/AndelaOSP/art-dashboard/deployments","created_at":"2018-02-12T11:52:48Z","updated_at":"2018-06-27T12:24:04Z","pushed_at":"2018-06-27T22:56:38Z","git_url":"git://github.com/AndelaOSP/art-dashboard.git","ssh_url":"git@github.com:AndelaOSP/art-dashboard.git","clone_url":"https://github.com/AndelaOSP/art-dashboard.git","svn_url":"https://github.com/AndelaOSP/art-dashboard","homepage":null,"size":3039,"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":0,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59"},"html":{"href":"https://github.com/AndelaOSP/art-dashboard/pull/59"},"issue":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/59"},"comments":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/AndelaOSP/art-dashboard/statuses/3432a833ab6939cdf285895a8f7c33e7060d79c4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sachungo"}}