{"action":"created","comment":{"url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/comments/233531393","pull_request_review_id":174967450,"id":233531393,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzUzMTM5Mw==","diff_hunk":"@@ -0,0 +1,68 @@\n+import {\n+  SAVE_INPUT,\n+  PASSWORD_RESET_REQUEST,\n+  PASSWORD_RESET_REQUEST_SUCCESS,\n+  PASSWORD_RESET_REQUEST_FAILURE,\n+  COMPLETE_RESET_REQUEST,\n+  COMPLETE_RESET_REQUEST_SUCCESS,\n+  COMPLETE_RESET_REQUEST_FAILURE,\n+  INPUT_ERROR\n+} from '../constants/resetPassword';\n+\n+const initialState = {\n+  email: '',\n+  password: '',\n+  confirmPassword: '',\n+  token: ''\n+};\n+\n+const passwordResetReducer = (state = initialState, action) => {\n+  let newState = { ...state };\n+\n+  switch (action.type) {\n+    // eslint-disable-no-case-declarations\n+    case SAVE_INPUT: {\n+      const { field, value } = action.payload;\n+      newState[field] = value;\n+      return newState;\n+    }\n+    case PASSWORD_RESET_REQUEST:\n+      newState = { ...state };\n+      newState.resetLoading = true;\n+      newState.email = '';\n+      return newState;\n+    case PASSWORD_RESET_REQUEST_SUCCESS:\n+      newState = { ...state };\n+      newState.resetLoading = false;\n+      newState.message = action.payload.message;\n+      return newState;\n+    case PASSWORD_RESET_REQUEST_FAILURE:","path":"src/redux/reducer/passwordReset.js","position":39,"original_position":39,"commit_id":"01aab0356dd4f2327f8ee559b47b20e9a08ea9fc","original_commit_id":"01aab0356dd4f2327f8ee559b47b20e9a08ea9fc","user":{"login":"codeclimate[bot]","id":36754821,"node_id":"MDM6Qm90MzY3NTQ4MjE=","avatar_url":"https://avatars0.githubusercontent.com/in/9403?v=4","gravatar_id":"","url":"https://api.github.com/users/codeclimate%5Bbot%5D","html_url":"https://github.com/apps/codeclimate","followers_url":"https://api.github.com/users/codeclimate%5Bbot%5D/followers","following_url":"https://api.github.com/users/codeclimate%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codeclimate%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codeclimate%5Bbot%5D/repos","events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"Similar blocks of code found in 3 locations. Consider refactoring.","created_at":"2018-11-14T16:53:08Z","updated_at":"2018-11-14T16:53:08Z","html_url":"https://github.com/andela/odin-ah-frontend/pull/10#discussion_r233531393","pull_request_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/comments/233531393"},"html":{"href":"https://github.com/andela/odin-ah-frontend/pull/10#discussion_r233531393"},"pull_request":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10","id":227986132,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3OTg2MTMy","html_url":"https://github.com/andela/odin-ah-frontend/pull/10","diff_url":"https://github.com/andela/odin-ah-frontend/pull/10.diff","patch_url":"https://github.com/andela/odin-ah-frontend/pull/10.patch","issue_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/10","number":10,"state":"open","locked":false,"title":" #160452434 User reset password","user":{"login":"hnobi","id":29021978,"node_id":"MDQ6VXNlcjI5MDIxOTc4","avatar_url":"https://avatars0.githubusercontent.com/u/29021978?v=4","gravatar_id":"","url":"https://api.github.com/users/hnobi","html_url":"https://github.com/hnobi","followers_url":"https://api.github.com/users/hnobi/followers","following_url":"https://api.github.com/users/hnobi/following{/other_user}","gists_url":"https://api.github.com/users/hnobi/gists{/gist_id}","starred_url":"https://api.github.com/users/hnobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hnobi/subscriptions","organizations_url":"https://api.github.com/users/hnobi/orgs","repos_url":"https://api.github.com/users/hnobi/repos","events_url":"https://api.github.com/users/hnobi/events{/privacy}","received_events_url":"https://api.github.com/users/hnobi/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nThis PR Adds reset password functionality to the codebase.\r\n#### Description of Task to be completed?\r\n- Add password reset form\r\n- Adds passwordRestReducer reducer\r\n- Adds actionType for resetPassword\r\n- Adds resetPassword actions\r\n- Adds resetPassword SCSS style\r\n\r\n#### How should this be manually tested?\r\n\r\n\r\n- Fetch and checkout to the branch\r\n```$xslt\r\n> git fetch\r\n> git checkout  ft-160452434-reset-password-functionality\r\n> npm install \r\n```\r\n```$xslt\r\n>  Rename the `.env.sample` file on the root directory of the cloned repo to `.env`. \r\n\r\n> Uncomment REACT_APP_HOST which is the link to the frontend application.\r\n\r\n> REACT_APP_BASE_API_URL which is the base URL for the backend api. \r\n\r\nFor example, `https://odin-ah-backend-staging.herokuapp.com/api/v1`.\r\n\r\n> start the dev server with: `npm start`\r\n\r\n>  run localhost/**/ ` in your browser and click on the `submit ` and check your email for reset password link.\r\n```\r\n#### Any background context you want to provide?\r\nNil \r\n#### What are the relevant pivotal tracker stories?\r\nhttps://www.pivotaltracker.com/story/show/160452434\r\n\r\n#### Screenshots (if appropriate)\r\n<img width=\"860\" alt=\"reset password\" src=\"https://user-images.githubusercontent.com/29021978/47926805-cd58bf80-dec1-11e8-9856-57f8b9a3866d.png\">\r\n\r\n#### Questions:\r\nNil","created_at":"2018-11-02T16:08:36Z","updated_at":"2018-11-14T16:53:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43fceea099a2854b8afda55a94367253a7ef688d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Alameen688","id":9039613,"node_id":"MDQ6VXNlcjkwMzk2MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9039613?v=4","gravatar_id":"","url":"https://api.github.com/users/Alameen688","html_url":"https://github.com/Alameen688","followers_url":"https://api.github.com/users/Alameen688/followers","following_url":"https://api.github.com/users/Alameen688/following{/other_user}","gists_url":"https://api.github.com/users/Alameen688/gists{/gist_id}","starred_url":"https://api.github.com/users/Alameen688/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alameen688/subscriptions","organizations_url":"https://api.github.com/users/Alameen688/orgs","repos_url":"https://api.github.com/users/Alameen688/repos","events_url":"https://api.github.com/users/Alameen688/events{/privacy}","received_events_url":"https://api.github.com/users/Alameen688/received_events","type":"User","site_admin":false},{"login":"blackshady","id":26234445,"node_id":"MDQ6VXNlcjI2MjM0NDQ1","avatar_url":"https://avatars3.githubusercontent.com/u/26234445?v=4","gravatar_id":"","url":"https://api.github.com/users/blackshady","html_url":"https://github.com/blackshady","followers_url":"https://api.github.com/users/blackshady/followers","following_url":"https://api.github.com/users/blackshady/following{/other_user}","gists_url":"https://api.github.com/users/blackshady/gists{/gist_id}","starred_url":"https://api.github.com/users/blackshady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blackshady/subscriptions","organizations_url":"https://api.github.com/users/blackshady/orgs","repos_url":"https://api.github.com/users/blackshady/repos","events_url":"https://api.github.com/users/blackshady/events{/privacy}","received_events_url":"https://api.github.com/users/blackshady/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10/commits","review_comments_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10/comments","review_comment_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/10/comments","statuses_url":"https://api.github.com/repos/andela/odin-ah-frontend/statuses/01aab0356dd4f2327f8ee559b47b20e9a08ea9fc","head":{"label":"andela:ft-160452434-reset-password-functionality","ref":"ft-160452434-reset-password-functionality","sha":"01aab0356dd4f2327f8ee559b47b20e9a08ea9fc","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":154684566,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ2ODQ1NjY=","name":"odin-ah-frontend","full_name":"andela/odin-ah-frontend","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/odin-ah-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/odin-ah-frontend","forks_url":"https://api.github.com/repos/andela/odin-ah-frontend/forks","keys_url":"https://api.github.com/repos/andela/odin-ah-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/odin-ah-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/odin-ah-frontend/teams","hooks_url":"https://api.github.com/repos/andela/odin-ah-frontend/hooks","issue_events_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/odin-ah-frontend/events","assignees_url":"https://api.github.com/repos/andela/odin-ah-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/odin-ah-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/odin-ah-frontend/tags","blobs_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/odin-ah-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/odin-ah-frontend/languages","stargazers_url":"https://api.github.com/repos/andela/odin-ah-frontend/stargazers","contributors_url":"https://api.github.com/repos/andela/odin-ah-frontend/contributors","subscribers_url":"https://api.github.com/repos/andela/odin-ah-frontend/subscribers","subscription_url":"https://api.github.com/repos/andela/odin-ah-frontend/subscription","commits_url":"https://api.github.com/repos/andela/odin-ah-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/odin-ah-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/odin-ah-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/odin-ah-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/odin-ah-frontend/merges","archive_url":"https://api.github.com/repos/andela/odin-ah-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/odin-ah-frontend/downloads","issues_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/odin-ah-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/odin-ah-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/odin-ah-frontend/labels{/name}","releases_url":"https://api.github.com/repos/andela/odin-ah-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/odin-ah-frontend/deployments","created_at":"2018-10-25T14:22:59Z","updated_at":"2018-11-12T10:31:53Z","pushed_at":"2018-11-14T16:34:18Z","git_url":"git://github.com/andela/odin-ah-frontend.git","ssh_url":"git@github.com:andela/odin-ah-frontend.git","clone_url":"https://github.com/andela/odin-ah-frontend.git","svn_url":"https://github.com/andela/odin-ah-frontend","homepage":null,"size":175,"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":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"staging"}},"base":{"label":"andela:staging","ref":"staging","sha":"d6382ad71a40468dc00cb2fe8d68e3739be298ad","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":154684566,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ2ODQ1NjY=","name":"odin-ah-frontend","full_name":"andela/odin-ah-frontend","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/odin-ah-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/andela/odin-ah-frontend","forks_url":"https://api.github.com/repos/andela/odin-ah-frontend/forks","keys_url":"https://api.github.com/repos/andela/odin-ah-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/odin-ah-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/odin-ah-frontend/teams","hooks_url":"https://api.github.com/repos/andela/odin-ah-frontend/hooks","issue_events_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/andela/odin-ah-frontend/events","assignees_url":"https://api.github.com/repos/andela/odin-ah-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/andela/odin-ah-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/andela/odin-ah-frontend/tags","blobs_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/odin-ah-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/odin-ah-frontend/languages","stargazers_url":"https://api.github.com/repos/andela/odin-ah-frontend/stargazers","contributors_url":"https://api.github.com/repos/andela/odin-ah-frontend/contributors","subscribers_url":"https://api.github.com/repos/andela/odin-ah-frontend/subscribers","subscription_url":"https://api.github.com/repos/andela/odin-ah-frontend/subscription","commits_url":"https://api.github.com/repos/andela/odin-ah-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/odin-ah-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/odin-ah-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/odin-ah-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/andela/odin-ah-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/odin-ah-frontend/merges","archive_url":"https://api.github.com/repos/andela/odin-ah-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/odin-ah-frontend/downloads","issues_url":"https://api.github.com/repos/andela/odin-ah-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/andela/odin-ah-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/odin-ah-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/odin-ah-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/odin-ah-frontend/labels{/name}","releases_url":"https://api.github.com/repos/andela/odin-ah-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/andela/odin-ah-frontend/deployments","created_at":"2018-10-25T14:22:59Z","updated_at":"2018-11-12T10:31:53Z","pushed_at":"2018-11-14T16:34:18Z","git_url":"git://github.com/andela/odin-ah-frontend.git","ssh_url":"git@github.com:andela/odin-ah-frontend.git","clone_url":"https://github.com/andela/odin-ah-frontend.git","svn_url":"https://github.com/andela/odin-ah-frontend","homepage":null,"size":175,"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":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10"},"html":{"href":"https://github.com/andela/odin-ah-frontend/pull/10"},"issue":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/issues/10"},"comments":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/andela/odin-ah-frontend/statuses/01aab0356dd4f2327f8ee559b47b20e9a08ea9fc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codeclimate"}}