{"action":"created","comment":{"url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/comments/221011885","pull_request_review_id":159558319,"id":221011885,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTAxMTg4NQ==","diff_hunk":"@@ -0,0 +1,158 @@\n+\n+import { Link } from 'react-router-dom';\n+import _ from 'lodash';\n+import PropTypes from 'prop-types';\n+import { connect } from 'react-redux';\n+import React, { Component } from 'react';\n+import moment from 'moment';\n+import { Parser as HtmlToReactParser } from 'html-to-react';\n+import {\n+  Container,\n+  Header,\n+  Icon,\n+  Menu,\n+} from 'semantic-ui-react';\n+import Button from '../components/Button';\n+\n+import fetchData from '../redux/actions/fetchData';\n+import HeaderComponent from '../components/Header/HeaderComponent';\n+\n+const htmlToReactParser = new HtmlToReactParser();\n+\n+export class SingleArticle extends Component {\n+  componentDidMount() {\n+    const { loadData, match } = this.props;\n+    const { slug } = match.params;\n+    const singleArticleRequest = {\n+      url: `https://fargo-ah-staging.herokuapp.com/api/articles/${slug.trim()}`,\n+      type: 'currentArticle',\n+      method: 'get',\n+    };\n+    loadData(singleArticleRequest);\n+    console.log('Hey I am mounted', this.props.deletedArticle);\n+  }\n+\n+  convertDataToReact = data => htmlToReactParser.parse(unescape(data));\n+\n+  handleDelete = (articleSlug) => {\n+    const {\n+      loadData, history, deletedArticle,\n+    } = this.props;\n+    this.setState({ loading: true });\n+    const deleteArticleRequest = {\n+      url: `https://fargo-ah-staging.herokuapp.com/api/articles/${articleSlug.trim()}`,\n+      type: 'deleteArticle',\n+      method: 'delete',\n+    };\n+    loadData(deleteArticleRequest);\n+    if (deletedArticle.articleDeleted === true) {\n+      console.log('article deleted');\n+      history.push('/delete-message');\n+      console.log('going to this path', history.path);","path":"src/views/SingleArticle.js","position":51,"original_position":51,"commit_id":"8797cc7274bb2415cb17b5cba1d849266f7a9dc7","original_commit_id":"8797cc7274bb2415cb17b5cba1d849266f7a9dc7","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":"Unexpected console statement                     no-console","created_at":"2018-09-27T17:32:04Z","updated_at":"2018-09-27T17:32:06Z","html_url":"https://github.com/andela/fargo-ah-client/pull/43#discussion_r221011885","pull_request_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/comments/221011885"},"html":{"href":"https://github.com/andela/fargo-ah-client/pull/43#discussion_r221011885"},"pull_request":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43","id":218108662,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MTA4NjYy","html_url":"https://github.com/andela/fargo-ah-client/pull/43","diff_url":"https://github.com/andela/fargo-ah-client/pull/43.diff","patch_url":"https://github.com/andela/fargo-ah-client/pull/43.patch","issue_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/43","number":43,"state":"open","locked":false,"title":"#160753026 Edit and Delete article","user":{"login":"OKiMaureen","id":31984004,"node_id":"MDQ6VXNlcjMxOTg0MDA0","avatar_url":"https://avatars0.githubusercontent.com/u/31984004?v=4","gravatar_id":"","url":"https://api.github.com/users/OKiMaureen","html_url":"https://github.com/OKiMaureen","followers_url":"https://api.github.com/users/OKiMaureen/followers","following_url":"https://api.github.com/users/OKiMaureen/following{/other_user}","gists_url":"https://api.github.com/users/OKiMaureen/gists{/gist_id}","starred_url":"https://api.github.com/users/OKiMaureen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OKiMaureen/subscriptions","organizations_url":"https://api.github.com/users/OKiMaureen/orgs","repos_url":"https://api.github.com/users/OKiMaureen/repos","events_url":"https://api.github.com/users/OKiMaureen/events{/privacy}","received_events_url":"https://api.github.com/users/OKiMaureen/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n    - User can edit and delete article\r\n\r\n#### Description of Task to be completed?\r\n    - create editArticle and deleteArticle file\r\n    - create edit and delete article actions\r\n    - create edit and delete article reducers\r\n    - write tests component, reducers and action tests\r\n   \r\n\r\n#### How should this be manually tested?\r\n\r\n- `git clone https://github.com/andela/fargo-ah-client.git Authors-Haven-Client`\r\n- `npm install`\r\n- `npm run dev` the start script\r\n-  Go to `/login` path and click on `login`\r\n-  Enter login details and login.\r\n- Go to `/{slug}/edit`\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- [#160753026](https://www.pivotaltracker.com/story/show/160753026\r\n\r\n\r\n#### Screenshots (if appropriate)\r\nNone yet\r\n\r\n#### Questions:\r\nN/A","created_at":"2018-09-25T20:28:01Z","updated_at":"2018-09-27T17:32:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c736873fafb4e9c37eb919c51686a90a04baacf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1054501103,"node_id":"MDU6TGFiZWwxMDU0NTAxMTAz","url":"https://api.github.com/repos/andela/fargo-ah-client/labels/WIP","name":"WIP","color":"60d1db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43/commits","review_comments_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43/comments","review_comment_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/43/comments","statuses_url":"https://api.github.com/repos/andela/fargo-ah-client/statuses/8797cc7274bb2415cb17b5cba1d849266f7a9dc7","head":{"label":"andela:ft_160590677_edit_delete_article","ref":"ft_160590677_edit_delete_article","sha":"8797cc7274bb2415cb17b5cba1d849266f7a9dc7","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":146319850,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMTk4NTA=","name":"fargo-ah-client","full_name":"andela/fargo-ah-client","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/fargo-ah-client","description":null,"fork":false,"url":"https://api.github.com/repos/andela/fargo-ah-client","forks_url":"https://api.github.com/repos/andela/fargo-ah-client/forks","keys_url":"https://api.github.com/repos/andela/fargo-ah-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/fargo-ah-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/fargo-ah-client/teams","hooks_url":"https://api.github.com/repos/andela/fargo-ah-client/hooks","issue_events_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/events{/number}","events_url":"https://api.github.com/repos/andela/fargo-ah-client/events","assignees_url":"https://api.github.com/repos/andela/fargo-ah-client/assignees{/user}","branches_url":"https://api.github.com/repos/andela/fargo-ah-client/branches{/branch}","tags_url":"https://api.github.com/repos/andela/fargo-ah-client/tags","blobs_url":"https://api.github.com/repos/andela/fargo-ah-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/fargo-ah-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/fargo-ah-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/fargo-ah-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/fargo-ah-client/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/fargo-ah-client/languages","stargazers_url":"https://api.github.com/repos/andela/fargo-ah-client/stargazers","contributors_url":"https://api.github.com/repos/andela/fargo-ah-client/contributors","subscribers_url":"https://api.github.com/repos/andela/fargo-ah-client/subscribers","subscription_url":"https://api.github.com/repos/andela/fargo-ah-client/subscription","commits_url":"https://api.github.com/repos/andela/fargo-ah-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/fargo-ah-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/fargo-ah-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/fargo-ah-client/contents/{+path}","compare_url":"https://api.github.com/repos/andela/fargo-ah-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/fargo-ah-client/merges","archive_url":"https://api.github.com/repos/andela/fargo-ah-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/fargo-ah-client/downloads","issues_url":"https://api.github.com/repos/andela/fargo-ah-client/issues{/number}","pulls_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/fargo-ah-client/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/fargo-ah-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/fargo-ah-client/labels{/name}","releases_url":"https://api.github.com/repos/andela/fargo-ah-client/releases{/id}","deployments_url":"https://api.github.com/repos/andela/fargo-ah-client/deployments","created_at":"2018-08-27T15:49:41Z","updated_at":"2018-09-26T11:30:23Z","pushed_at":"2018-09-27T17:31:26Z","git_url":"git://github.com/andela/fargo-ah-client.git","ssh_url":"git@github.com:andela/fargo-ah-client.git","clone_url":"https://github.com/andela/fargo-ah-client.git","svn_url":"https://github.com/andela/fargo-ah-client","homepage":null,"size":1517,"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":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"9a183a6daaf15f889f6770c34962168440b3039b","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":146319850,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzMTk4NTA=","name":"fargo-ah-client","full_name":"andela/fargo-ah-client","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/fargo-ah-client","description":null,"fork":false,"url":"https://api.github.com/repos/andela/fargo-ah-client","forks_url":"https://api.github.com/repos/andela/fargo-ah-client/forks","keys_url":"https://api.github.com/repos/andela/fargo-ah-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/fargo-ah-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/fargo-ah-client/teams","hooks_url":"https://api.github.com/repos/andela/fargo-ah-client/hooks","issue_events_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/events{/number}","events_url":"https://api.github.com/repos/andela/fargo-ah-client/events","assignees_url":"https://api.github.com/repos/andela/fargo-ah-client/assignees{/user}","branches_url":"https://api.github.com/repos/andela/fargo-ah-client/branches{/branch}","tags_url":"https://api.github.com/repos/andela/fargo-ah-client/tags","blobs_url":"https://api.github.com/repos/andela/fargo-ah-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/fargo-ah-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/fargo-ah-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/fargo-ah-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/fargo-ah-client/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/fargo-ah-client/languages","stargazers_url":"https://api.github.com/repos/andela/fargo-ah-client/stargazers","contributors_url":"https://api.github.com/repos/andela/fargo-ah-client/contributors","subscribers_url":"https://api.github.com/repos/andela/fargo-ah-client/subscribers","subscription_url":"https://api.github.com/repos/andela/fargo-ah-client/subscription","commits_url":"https://api.github.com/repos/andela/fargo-ah-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/fargo-ah-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/fargo-ah-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/fargo-ah-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/fargo-ah-client/contents/{+path}","compare_url":"https://api.github.com/repos/andela/fargo-ah-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/fargo-ah-client/merges","archive_url":"https://api.github.com/repos/andela/fargo-ah-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/fargo-ah-client/downloads","issues_url":"https://api.github.com/repos/andela/fargo-ah-client/issues{/number}","pulls_url":"https://api.github.com/repos/andela/fargo-ah-client/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/fargo-ah-client/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/fargo-ah-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/fargo-ah-client/labels{/name}","releases_url":"https://api.github.com/repos/andela/fargo-ah-client/releases{/id}","deployments_url":"https://api.github.com/repos/andela/fargo-ah-client/deployments","created_at":"2018-08-27T15:49:41Z","updated_at":"2018-09-26T11:30:23Z","pushed_at":"2018-09-27T17:31:26Z","git_url":"git://github.com/andela/fargo-ah-client.git","ssh_url":"git@github.com:andela/fargo-ah-client.git","clone_url":"https://github.com/andela/fargo-ah-client.git","svn_url":"https://github.com/andela/fargo-ah-client","homepage":null,"size":1517,"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":8,"license":null,"forks":0,"open_issues":8,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43"},"html":{"href":"https://github.com/andela/fargo-ah-client/pull/43"},"issue":{"href":"https://api.github.com/repos/andela/fargo-ah-client/issues/43"},"comments":{"href":"https://api.github.com/repos/andela/fargo-ah-client/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/fargo-ah-client/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/andela/fargo-ah-client/statuses/8797cc7274bb2415cb17b5cba1d849266f7a9dc7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}