{"action":"closed","number":46,"pull_request":{"url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46","id":240425627,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNDI1NjI3","html_url":"https://github.com/andela/ah-backend-poseidon/pull/46","diff_url":"https://github.com/andela/ah-backend-poseidon/pull/46.diff","patch_url":"https://github.com/andela/ah-backend-poseidon/pull/46.patch","issue_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/46","number":46,"state":"closed","locked":false,"title":"162806945 Bug fix on comment edit history 162806945","user":{"login":"okellogabrielinnocent","id":9958391,"node_id":"MDQ6VXNlcjk5NTgzOTE=","avatar_url":"https://avatars3.githubusercontent.com/u/9958391?v=4","gravatar_id":"","url":"https://api.github.com/users/okellogabrielinnocent","html_url":"https://github.com/okellogabrielinnocent","followers_url":"https://api.github.com/users/okellogabrielinnocent/followers","following_url":"https://api.github.com/users/okellogabrielinnocent/following{/other_user}","gists_url":"https://api.github.com/users/okellogabrielinnocent/gists{/gist_id}","starred_url":"https://api.github.com/users/okellogabrielinnocent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okellogabrielinnocent/subscriptions","organizations_url":"https://api.github.com/users/okellogabrielinnocent/orgs","repos_url":"https://api.github.com/users/okellogabrielinnocent/repos","events_url":"https://api.github.com/users/okellogabrielinnocent/events{/privacy}","received_events_url":"https://api.github.com/users/okellogabrielinnocent/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\n- Implements viewing of the previous versions of comments made on an article after edits.\r\n### Description of Task to be completed?\r\n- Fix return parameters of comment edit history to return update date and time on a comment\r\n### How should this be manually tested?\r\n- On your local machine, checkout the develop branch  using `git checkout develop`,  and pull the changes.\r\n- Then checkout this feature branch using `git checkout bug-comments-edit-history-162806945`\r\n- Open your editor and go to the project workspace.\r\n- Activate the virtual environment and install the dependencies using `pip install requirements.txt`.\r\n- Create a Postgres database called ahdb and make migrations by running:\r\n    - `python manage.py makemigrations`\r\n    - `python manage.py migrate`\r\n- Run the server using `python manage.py runserver`\r\n- With registered Articles and user logged in, get the id of comment and slug of an article you want to update\r\n- Using swagger docs on (http://127.0.0.1:8000/docs/), go to `/api/{slug}/comments/{id}` which is endpoint with `PUT` method or use `PUT` method on postman with `http://localhost:8000/api/coding/comments/{id}` route.\r\n- On swagger doc pass in the id of comment in the id field and slug of the Article in the slug field\r\n- Use the data format to update comment\r\n```\r\n{\r\n  \"comment\":{\"body\": \"Love God coding\"}\r\n}\r\n```\r\n- Click on Execute\r\n- Sample data returned\r\n```\r\n{\r\n  \"comment\": {\r\n    \"message\": \"This comment has been updated successfully\" }\r\n}\r\n```\r\n- To retrieve the comment using swagger docs on (http://127.0.0.1:8000/docs/)  and got to `/api/{slug}/comments/{id}/history` which is endpoint for `GET` method or use `GET` method on postman with `http://localhost:8000/api/coding/comments/1` route.\r\n- On swagger pass in the id of comment in the id field and slug of the Article in the slug field\r\n- Click on Execute\r\n- Sample data returned\r\n```\r\n{\r\n  \"comment\": [\r\n    {\r\n      \"id\": 1,\r\n      \"body\": \"Love God coding\",\r\n      \"commented_by\": 1,\r\n      \"created_at\": \"2018-12-21T09:26:44.140974Z\",\r\n      \"updated_at\": \"2018-12-21T09:27:25.025584Z\"\r\n    },\r\n    {\r\n      \"id\": 1,\r\n      \"body\": \"Love God coding\",\r\n      \"commented_by\": 1,\r\n      \"created_at\": \"2018-12-21T09:26:44.140974Z\",\r\n      \"updated_at\": \"2018-12-21T09:26:44.141002Z\"\r\n    }\r\n  ]\r\n}\r\n```\r\n#162806945","created_at":"2018-12-21T10:02:57Z","updated_at":"2018-12-21T10:42:07Z","closed_at":"2018-12-21T10:42:07Z","merged_at":"2018-12-21T10:42:07Z","merge_commit_sha":"2acf27240da7b17f84b90aad86e8271d265b4331","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46/commits","review_comments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46/comments","review_comment_url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/46/comments","statuses_url":"https://api.github.com/repos/andela/ah-backend-poseidon/statuses/ece3c26ecc01c56828204bac2c50d1b936d1b4be","head":{"label":"andela:bug-comment-edit-history-162806945","ref":"bug-comment-edit-history-162806945","sha":"ece3c26ecc01c56828204bac2c50d1b936d1b4be","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":158799017,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg3OTkwMTc=","name":"ah-backend-poseidon","full_name":"andela/ah-backend-poseidon","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/ah-backend-poseidon","description":null,"fork":false,"url":"https://api.github.com/repos/andela/ah-backend-poseidon","forks_url":"https://api.github.com/repos/andela/ah-backend-poseidon/forks","keys_url":"https://api.github.com/repos/andela/ah-backend-poseidon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/ah-backend-poseidon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/ah-backend-poseidon/teams","hooks_url":"https://api.github.com/repos/andela/ah-backend-poseidon/hooks","issue_events_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/events{/number}","events_url":"https://api.github.com/repos/andela/ah-backend-poseidon/events","assignees_url":"https://api.github.com/repos/andela/ah-backend-poseidon/assignees{/user}","branches_url":"https://api.github.com/repos/andela/ah-backend-poseidon/branches{/branch}","tags_url":"https://api.github.com/repos/andela/ah-backend-poseidon/tags","blobs_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/ah-backend-poseidon/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/ah-backend-poseidon/languages","stargazers_url":"https://api.github.com/repos/andela/ah-backend-poseidon/stargazers","contributors_url":"https://api.github.com/repos/andela/ah-backend-poseidon/contributors","subscribers_url":"https://api.github.com/repos/andela/ah-backend-poseidon/subscribers","subscription_url":"https://api.github.com/repos/andela/ah-backend-poseidon/subscription","commits_url":"https://api.github.com/repos/andela/ah-backend-poseidon/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/ah-backend-poseidon/contents/{+path}","compare_url":"https://api.github.com/repos/andela/ah-backend-poseidon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/ah-backend-poseidon/merges","archive_url":"https://api.github.com/repos/andela/ah-backend-poseidon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/ah-backend-poseidon/downloads","issues_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues{/number}","pulls_url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/ah-backend-poseidon/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/ah-backend-poseidon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/ah-backend-poseidon/labels{/name}","releases_url":"https://api.github.com/repos/andela/ah-backend-poseidon/releases{/id}","deployments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/deployments","created_at":"2018-11-23T07:55:00Z","updated_at":"2018-12-21T10:15:17Z","pushed_at":"2018-12-21T10:42:07Z","git_url":"git://github.com/andela/ah-backend-poseidon.git","ssh_url":"git@github.com:andela/ah-backend-poseidon.git","clone_url":"https://github.com/andela/ah-backend-poseidon.git","svn_url":"https://github.com/andela/ah-backend-poseidon","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"5ad3710dbc88a9dede9dc0fae0db7588c076c4e5","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":158799017,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg3OTkwMTc=","name":"ah-backend-poseidon","full_name":"andela/ah-backend-poseidon","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/ah-backend-poseidon","description":null,"fork":false,"url":"https://api.github.com/repos/andela/ah-backend-poseidon","forks_url":"https://api.github.com/repos/andela/ah-backend-poseidon/forks","keys_url":"https://api.github.com/repos/andela/ah-backend-poseidon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/ah-backend-poseidon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/ah-backend-poseidon/teams","hooks_url":"https://api.github.com/repos/andela/ah-backend-poseidon/hooks","issue_events_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/events{/number}","events_url":"https://api.github.com/repos/andela/ah-backend-poseidon/events","assignees_url":"https://api.github.com/repos/andela/ah-backend-poseidon/assignees{/user}","branches_url":"https://api.github.com/repos/andela/ah-backend-poseidon/branches{/branch}","tags_url":"https://api.github.com/repos/andela/ah-backend-poseidon/tags","blobs_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/ah-backend-poseidon/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/ah-backend-poseidon/languages","stargazers_url":"https://api.github.com/repos/andela/ah-backend-poseidon/stargazers","contributors_url":"https://api.github.com/repos/andela/ah-backend-poseidon/contributors","subscribers_url":"https://api.github.com/repos/andela/ah-backend-poseidon/subscribers","subscription_url":"https://api.github.com/repos/andela/ah-backend-poseidon/subscription","commits_url":"https://api.github.com/repos/andela/ah-backend-poseidon/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/ah-backend-poseidon/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/ah-backend-poseidon/contents/{+path}","compare_url":"https://api.github.com/repos/andela/ah-backend-poseidon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/ah-backend-poseidon/merges","archive_url":"https://api.github.com/repos/andela/ah-backend-poseidon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/ah-backend-poseidon/downloads","issues_url":"https://api.github.com/repos/andela/ah-backend-poseidon/issues{/number}","pulls_url":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/ah-backend-poseidon/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/ah-backend-poseidon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/ah-backend-poseidon/labels{/name}","releases_url":"https://api.github.com/repos/andela/ah-backend-poseidon/releases{/id}","deployments_url":"https://api.github.com/repos/andela/ah-backend-poseidon/deployments","created_at":"2018-11-23T07:55:00Z","updated_at":"2018-12-21T10:15:17Z","pushed_at":"2018-12-21T10:42:07Z","git_url":"git://github.com/andela/ah-backend-poseidon.git","ssh_url":"git@github.com:andela/ah-backend-poseidon.git","clone_url":"https://github.com/andela/ah-backend-poseidon.git","svn_url":"https://github.com/andela/ah-backend-poseidon","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"Python","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":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46"},"html":{"href":"https://github.com/andela/ah-backend-poseidon/pull/46"},"issue":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/46"},"comments":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/issues/46/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/pulls/46/commits"},"statuses":{"href":"https://api.github.com/repos/andela/ah-backend-poseidon/statuses/ece3c26ecc01c56828204bac2c50d1b936d1b4be"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"malep2007","id":17592399,"node_id":"MDQ6VXNlcjE3NTkyMzk5","avatar_url":"https://avatars2.githubusercontent.com/u/17592399?v=4","gravatar_id":"","url":"https://api.github.com/users/malep2007","html_url":"https://github.com/malep2007","followers_url":"https://api.github.com/users/malep2007/followers","following_url":"https://api.github.com/users/malep2007/following{/other_user}","gists_url":"https://api.github.com/users/malep2007/gists{/gist_id}","starred_url":"https://api.github.com/users/malep2007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malep2007/subscriptions","organizations_url":"https://api.github.com/users/malep2007/orgs","repos_url":"https://api.github.com/users/malep2007/repos","events_url":"https://api.github.com/users/malep2007/events{/privacy}","received_events_url":"https://api.github.com/users/malep2007/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":520,"deletions":23,"changed_files":13}}
{"actor":{"display_login":"malep2007"}}