{"action":"created","comment":{"url":"https://api.github.com/repos/buitiendo/sample_app/pulls/comments/223920114","pull_request_review_id":163165492,"id":223920114,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzkyMDExNA==","diff_hunk":"@@ -1,9 +1,35 @@\n class User < ApplicationRecord\n+  attr_accessor :remember_token\n+  before_save {email.downcase!}\n   validates :name, presence: true, length: {maximum: Settings.client.maximum1}\n   VALID_EMAIL_REGEX = /\\A[\\w+\\-.]+@[a-z\\d\\-.]+\\.[a-z]+\\z/i\n   validates :email, presence: true, length: {maximum: Settings.client.maximum2},\n     format: {with: VALID_EMAIL_REGEX},\n     uniqueness: {case_sensitive: false}\n   has_secure_password\n   validates :password, presence: true, length: {minimum: Settings.client.minimum}\n+\n+  class << self\n+    def digest string\n+      cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost\n+      BCrypt::Password.create string, cost: cost\n+    end\n+\n+    def new_token\n+      SecureRandom.urlsafe_base64\n+    end\n+\n+    def remember\n+      remember_token = new_token\n+      update_attribute :remember_digest, digest(remember_token)","path":"app/models/user.rb","position":null,"original_position":24,"commit_id":"ccdd65f7cf878ea7cdb4b3223c5a7c1fd22faf04","original_commit_id":"87369bae7fc4365007f9b569c534e4246d64aefb","user":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"body":"yes!","created_at":"2018-10-10T02:31:57Z","updated_at":"2018-10-10T02:31:57Z","html_url":"https://github.com/buitiendo/sample_app/pull/5#discussion_r223920114","pull_request_url":"https://api.github.com/repos/buitiendo/sample_app/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/comments/223920114"},"html":{"href":"https://github.com/buitiendo/sample_app/pull/5#discussion_r223920114"},"pull_request":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/5"}},"in_reply_to_id":223917059},"pull_request":{"url":"https://api.github.com/repos/buitiendo/sample_app/pulls/5","id":221629855,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxNjI5ODU1","html_url":"https://github.com/buitiendo/sample_app/pull/5","diff_url":"https://github.com/buitiendo/sample_app/pull/5.diff","patch_url":"https://github.com/buitiendo/sample_app/pull/5.patch","issue_url":"https://api.github.com/repos/buitiendo/sample_app/issues/5","number":5,"state":"open","locked":false,"title":"Implement advanced login","user":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-10T01:02:08Z","updated_at":"2018-10-10T02:31:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b36c2401a68360eaa964bf334ee3c9bf1ec02e4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/buitiendo/sample_app/pulls/5/commits","review_comments_url":"https://api.github.com/repos/buitiendo/sample_app/pulls/5/comments","review_comment_url":"https://api.github.com/repos/buitiendo/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buitiendo/sample_app/issues/5/comments","statuses_url":"https://api.github.com/repos/buitiendo/sample_app/statuses/ccdd65f7cf878ea7cdb4b3223c5a7c1fd22faf04","head":{"label":"buitiendo:advanced-login","ref":"advanced-login","sha":"ccdd65f7cf878ea7cdb4b3223c5a7c1fd22faf04","user":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"repo":{"id":151502019,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE1MDIwMTk=","name":"sample_app","full_name":"buitiendo/sample_app","private":false,"owner":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/buitiendo/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/buitiendo/sample_app","forks_url":"https://api.github.com/repos/buitiendo/sample_app/forks","keys_url":"https://api.github.com/repos/buitiendo/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buitiendo/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buitiendo/sample_app/teams","hooks_url":"https://api.github.com/repos/buitiendo/sample_app/hooks","issue_events_url":"https://api.github.com/repos/buitiendo/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/buitiendo/sample_app/events","assignees_url":"https://api.github.com/repos/buitiendo/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/buitiendo/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/buitiendo/sample_app/tags","blobs_url":"https://api.github.com/repos/buitiendo/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buitiendo/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buitiendo/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/buitiendo/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buitiendo/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/buitiendo/sample_app/languages","stargazers_url":"https://api.github.com/repos/buitiendo/sample_app/stargazers","contributors_url":"https://api.github.com/repos/buitiendo/sample_app/contributors","subscribers_url":"https://api.github.com/repos/buitiendo/sample_app/subscribers","subscription_url":"https://api.github.com/repos/buitiendo/sample_app/subscription","commits_url":"https://api.github.com/repos/buitiendo/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/buitiendo/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/buitiendo/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/buitiendo/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/buitiendo/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/buitiendo/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buitiendo/sample_app/merges","archive_url":"https://api.github.com/repos/buitiendo/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buitiendo/sample_app/downloads","issues_url":"https://api.github.com/repos/buitiendo/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/buitiendo/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/buitiendo/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/buitiendo/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buitiendo/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/buitiendo/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/buitiendo/sample_app/deployments","created_at":"2018-10-04T01:11:33Z","updated_at":"2018-10-09T06:36:04Z","pushed_at":"2018-10-10T02:31:42Z","git_url":"git://github.com/buitiendo/sample_app.git","ssh_url":"git@github.com:buitiendo/sample_app.git","clone_url":"https://github.com/buitiendo/sample_app.git","svn_url":"https://github.com/buitiendo/sample_app","homepage":null,"size":208,"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":"master"}},"base":{"label":"buitiendo:master","ref":"master","sha":"457215797beb9518de55ac0f8b2f1bca9059fe3e","user":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"repo":{"id":151502019,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE1MDIwMTk=","name":"sample_app","full_name":"buitiendo/sample_app","private":false,"owner":{"login":"buitiendo","id":43602883,"node_id":"MDQ6VXNlcjQzNjAyODgz","avatar_url":"https://avatars2.githubusercontent.com/u/43602883?v=4","gravatar_id":"","url":"https://api.github.com/users/buitiendo","html_url":"https://github.com/buitiendo","followers_url":"https://api.github.com/users/buitiendo/followers","following_url":"https://api.github.com/users/buitiendo/following{/other_user}","gists_url":"https://api.github.com/users/buitiendo/gists{/gist_id}","starred_url":"https://api.github.com/users/buitiendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buitiendo/subscriptions","organizations_url":"https://api.github.com/users/buitiendo/orgs","repos_url":"https://api.github.com/users/buitiendo/repos","events_url":"https://api.github.com/users/buitiendo/events{/privacy}","received_events_url":"https://api.github.com/users/buitiendo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/buitiendo/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/buitiendo/sample_app","forks_url":"https://api.github.com/repos/buitiendo/sample_app/forks","keys_url":"https://api.github.com/repos/buitiendo/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buitiendo/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buitiendo/sample_app/teams","hooks_url":"https://api.github.com/repos/buitiendo/sample_app/hooks","issue_events_url":"https://api.github.com/repos/buitiendo/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/buitiendo/sample_app/events","assignees_url":"https://api.github.com/repos/buitiendo/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/buitiendo/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/buitiendo/sample_app/tags","blobs_url":"https://api.github.com/repos/buitiendo/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buitiendo/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buitiendo/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/buitiendo/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buitiendo/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/buitiendo/sample_app/languages","stargazers_url":"https://api.github.com/repos/buitiendo/sample_app/stargazers","contributors_url":"https://api.github.com/repos/buitiendo/sample_app/contributors","subscribers_url":"https://api.github.com/repos/buitiendo/sample_app/subscribers","subscription_url":"https://api.github.com/repos/buitiendo/sample_app/subscription","commits_url":"https://api.github.com/repos/buitiendo/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/buitiendo/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/buitiendo/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/buitiendo/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/buitiendo/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/buitiendo/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buitiendo/sample_app/merges","archive_url":"https://api.github.com/repos/buitiendo/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buitiendo/sample_app/downloads","issues_url":"https://api.github.com/repos/buitiendo/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/buitiendo/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/buitiendo/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/buitiendo/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buitiendo/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/buitiendo/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/buitiendo/sample_app/deployments","created_at":"2018-10-04T01:11:33Z","updated_at":"2018-10-09T06:36:04Z","pushed_at":"2018-10-10T02:31:42Z","git_url":"git://github.com/buitiendo/sample_app.git","ssh_url":"git@github.com:buitiendo/sample_app.git","clone_url":"https://github.com/buitiendo/sample_app.git","svn_url":"https://github.com/buitiendo/sample_app","homepage":null,"size":208,"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":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/5"},"html":{"href":"https://github.com/buitiendo/sample_app/pull/5"},"issue":{"href":"https://api.github.com/repos/buitiendo/sample_app/issues/5"},"comments":{"href":"https://api.github.com/repos/buitiendo/sample_app/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buitiendo/sample_app/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/buitiendo/sample_app/statuses/ccdd65f7cf878ea7cdb4b3223c5a7c1fd22faf04"}},"author_association":"OWNER"}}
{"actor":{"display_login":"buitiendo"}}