{"action":"created","comment":{"url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/comments/240761420","pull_request_review_id":183865851,"id":240761420,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDc2MTQyMA==","diff_hunk":"@@ -0,0 +1,24 @@\n+module PasswordResetsHelper\n+  def extract_user_from_reset_params\n+    @user = User.find_by(email: params[:password_reset][:email].downcase)\n+  end\n+\n+  def get_user_by_email\n+    @user = User.find_by(email: params[:email].downcase)\n+  end\n+\n+  def valid_user\n+    unless @user && @user.activated? && @user.authenticated?(:reset, params[:id])\n+      redirect_to root_url, flash: {\n+        info: 'There is a problem with the reset url. Kindly request for a new one'\n+      }\n+    end\n+  end\n+\n+  def check_reset_token_expiration\n+    msg = 'Password reset has expired.'\n+    if @user.reset_expired?","path":"app/helpers/password_resets_helper.rb","position":20,"original_position":20,"commit_id":"f01d2a8b031bb887af5076758e5912eb971dd5e3","original_commit_id":"ee377356c63d4d96a57bb659b715602914462a3c","user":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"body":"done","created_at":"2018-12-11T19:36:21Z","updated_at":"2018-12-11T19:36:22Z","html_url":"https://github.com/jmutuku95/simpleapp/pull/8#discussion_r240761420","pull_request_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/comments/240761420"},"html":{"href":"https://github.com/jmutuku95/simpleapp/pull/8#discussion_r240761420"},"pull_request":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8"}},"in_reply_to_id":240744416},"pull_request":{"url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8","id":237761100,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NzYxMTAw","html_url":"https://github.com/jmutuku95/simpleapp/pull/8","diff_url":"https://github.com/jmutuku95/simpleapp/pull/8.diff","patch_url":"https://github.com/jmutuku95/simpleapp/pull/8.patch","issue_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/8","number":8,"state":"open","locked":false,"title":"Password reset feature","user":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"body":"- Add password reset functionality on top of password reset","created_at":"2018-12-11T17:16:27Z","updated_at":"2018-12-11T19:36:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ab453c8067bca30c851a2a3a41760cd5d8607c6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8/commits","review_comments_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8/comments","review_comment_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/8/comments","statuses_url":"https://api.github.com/repos/jmutuku95/simpleapp/statuses/f01d2a8b031bb887af5076758e5912eb971dd5e3","head":{"label":"jmutuku95:ft-password-reset","ref":"ft-password-reset","sha":"f01d2a8b031bb887af5076758e5912eb971dd5e3","user":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"repo":{"id":152202616,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyMDI2MTY=","name":"simpleapp","full_name":"jmutuku95/simpleapp","private":false,"owner":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jmutuku95/simpleapp","description":null,"fork":false,"url":"https://api.github.com/repos/jmutuku95/simpleapp","forks_url":"https://api.github.com/repos/jmutuku95/simpleapp/forks","keys_url":"https://api.github.com/repos/jmutuku95/simpleapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmutuku95/simpleapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmutuku95/simpleapp/teams","hooks_url":"https://api.github.com/repos/jmutuku95/simpleapp/hooks","issue_events_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/events{/number}","events_url":"https://api.github.com/repos/jmutuku95/simpleapp/events","assignees_url":"https://api.github.com/repos/jmutuku95/simpleapp/assignees{/user}","branches_url":"https://api.github.com/repos/jmutuku95/simpleapp/branches{/branch}","tags_url":"https://api.github.com/repos/jmutuku95/simpleapp/tags","blobs_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmutuku95/simpleapp/statuses/{sha}","languages_url":"https://api.github.com/repos/jmutuku95/simpleapp/languages","stargazers_url":"https://api.github.com/repos/jmutuku95/simpleapp/stargazers","contributors_url":"https://api.github.com/repos/jmutuku95/simpleapp/contributors","subscribers_url":"https://api.github.com/repos/jmutuku95/simpleapp/subscribers","subscription_url":"https://api.github.com/repos/jmutuku95/simpleapp/subscription","commits_url":"https://api.github.com/repos/jmutuku95/simpleapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmutuku95/simpleapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmutuku95/simpleapp/contents/{+path}","compare_url":"https://api.github.com/repos/jmutuku95/simpleapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmutuku95/simpleapp/merges","archive_url":"https://api.github.com/repos/jmutuku95/simpleapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmutuku95/simpleapp/downloads","issues_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues{/number}","pulls_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls{/number}","milestones_url":"https://api.github.com/repos/jmutuku95/simpleapp/milestones{/number}","notifications_url":"https://api.github.com/repos/jmutuku95/simpleapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmutuku95/simpleapp/labels{/name}","releases_url":"https://api.github.com/repos/jmutuku95/simpleapp/releases{/id}","deployments_url":"https://api.github.com/repos/jmutuku95/simpleapp/deployments","created_at":"2018-10-09T06:57:07Z","updated_at":"2018-12-11T18:44:03Z","pushed_at":"2018-12-11T18:55:12Z","git_url":"git://github.com/jmutuku95/simpleapp.git","ssh_url":"git@github.com:jmutuku95/simpleapp.git","clone_url":"https://github.com/jmutuku95/simpleapp.git","svn_url":"https://github.com/jmutuku95/simpleapp","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"jmutuku95:develop","ref":"develop","sha":"8aeeb13483547d4a77659412146c7370ba0c3b62","user":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"repo":{"id":152202616,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIyMDI2MTY=","name":"simpleapp","full_name":"jmutuku95/simpleapp","private":false,"owner":{"login":"jmutuku95","id":28805113,"node_id":"MDQ6VXNlcjI4ODA1MTEz","avatar_url":"https://avatars3.githubusercontent.com/u/28805113?v=4","gravatar_id":"","url":"https://api.github.com/users/jmutuku95","html_url":"https://github.com/jmutuku95","followers_url":"https://api.github.com/users/jmutuku95/followers","following_url":"https://api.github.com/users/jmutuku95/following{/other_user}","gists_url":"https://api.github.com/users/jmutuku95/gists{/gist_id}","starred_url":"https://api.github.com/users/jmutuku95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmutuku95/subscriptions","organizations_url":"https://api.github.com/users/jmutuku95/orgs","repos_url":"https://api.github.com/users/jmutuku95/repos","events_url":"https://api.github.com/users/jmutuku95/events{/privacy}","received_events_url":"https://api.github.com/users/jmutuku95/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jmutuku95/simpleapp","description":null,"fork":false,"url":"https://api.github.com/repos/jmutuku95/simpleapp","forks_url":"https://api.github.com/repos/jmutuku95/simpleapp/forks","keys_url":"https://api.github.com/repos/jmutuku95/simpleapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmutuku95/simpleapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmutuku95/simpleapp/teams","hooks_url":"https://api.github.com/repos/jmutuku95/simpleapp/hooks","issue_events_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/events{/number}","events_url":"https://api.github.com/repos/jmutuku95/simpleapp/events","assignees_url":"https://api.github.com/repos/jmutuku95/simpleapp/assignees{/user}","branches_url":"https://api.github.com/repos/jmutuku95/simpleapp/branches{/branch}","tags_url":"https://api.github.com/repos/jmutuku95/simpleapp/tags","blobs_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmutuku95/simpleapp/statuses/{sha}","languages_url":"https://api.github.com/repos/jmutuku95/simpleapp/languages","stargazers_url":"https://api.github.com/repos/jmutuku95/simpleapp/stargazers","contributors_url":"https://api.github.com/repos/jmutuku95/simpleapp/contributors","subscribers_url":"https://api.github.com/repos/jmutuku95/simpleapp/subscribers","subscription_url":"https://api.github.com/repos/jmutuku95/simpleapp/subscription","commits_url":"https://api.github.com/repos/jmutuku95/simpleapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmutuku95/simpleapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmutuku95/simpleapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmutuku95/simpleapp/contents/{+path}","compare_url":"https://api.github.com/repos/jmutuku95/simpleapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmutuku95/simpleapp/merges","archive_url":"https://api.github.com/repos/jmutuku95/simpleapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmutuku95/simpleapp/downloads","issues_url":"https://api.github.com/repos/jmutuku95/simpleapp/issues{/number}","pulls_url":"https://api.github.com/repos/jmutuku95/simpleapp/pulls{/number}","milestones_url":"https://api.github.com/repos/jmutuku95/simpleapp/milestones{/number}","notifications_url":"https://api.github.com/repos/jmutuku95/simpleapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmutuku95/simpleapp/labels{/name}","releases_url":"https://api.github.com/repos/jmutuku95/simpleapp/releases{/id}","deployments_url":"https://api.github.com/repos/jmutuku95/simpleapp/deployments","created_at":"2018-10-09T06:57:07Z","updated_at":"2018-12-11T18:44:03Z","pushed_at":"2018-12-11T18:55:12Z","git_url":"git://github.com/jmutuku95/simpleapp.git","ssh_url":"git@github.com:jmutuku95/simpleapp.git","clone_url":"https://github.com/jmutuku95/simpleapp.git","svn_url":"https://github.com/jmutuku95/simpleapp","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8"},"html":{"href":"https://github.com/jmutuku95/simpleapp/pull/8"},"issue":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/issues/8"},"comments":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/jmutuku95/simpleapp/statuses/f01d2a8b031bb887af5076758e5912eb971dd5e3"}},"author_association":"OWNER"}}
{"actor":{"display_login":"jmutuku95"}}