{"action":"created","comment":{"url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/comments/180011854","pull_request_review_id":110356719,"id":180011854,"diff_hunk":"@@ -0,0 +1,11 @@\n+# User model\n+class User < ApplicationRecord\n+  before_save{self.email = email.downcase}\n+  validates :name, presence: true, length: {maximum: 50}\n+  VALID_EMAIL_REGEX = /\\A[\\w+\\-.]+@[a-z\\d\\-.]+\\.[a-z]+\\z/i\n+  validates :email, presence: true, length: {maximum: 255},\n+                    format: {with: VALID_EMAIL_REGEX},\n+                    uniqueness: {case_sensitive: false}\n+  has_secure_password","path":"app/models/user.rb","position":9,"original_position":9,"commit_id":"acf00ecaf3561fb7718af8604ade108e466fc4f8","original_commit_id":"acf00ecaf3561fb7718af8604ade108e466fc4f8","user":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"body":"has_secure_password là phương thức để đặt hay chứng thực mật khẩu khi dùng gem BCrypt. gem BCrypt dùng để băm mật khẩu người dùng đăng ký thành 1 chuỗi mã hóa (mục đích là để bảo mật, không lộ rõ ràng mật khẩu người dùng).","created_at":"2018-04-09T07:50:30Z","updated_at":"2018-04-09T07:50:45Z","html_url":"https://github.com/duychinh1995/sample_app/pull/5#discussion_r180011854","pull_request_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/duychinh1995/sample_app/pulls/comments/180011854"},"html":{"href":"https://github.com/duychinh1995/sample_app/pull/5#discussion_r180011854"},"pull_request":{"href":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5"}},"in_reply_to_id":180003965},"pull_request":{"url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5","id":180225276,"html_url":"https://github.com/duychinh1995/sample_app/pull/5","diff_url":"https://github.com/duychinh1995/sample_app/pull/5.diff","patch_url":"https://github.com/duychinh1995/sample_app/pull/5.patch","issue_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/5","number":5,"state":"open","locked":false,"title":"chapter 6","user":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-09T06:56:18Z","updated_at":"2018-04-09T07:50:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b76656e39f112f04e440efbbefb86ca1bf4cd9d4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5/commits","review_comments_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5/comments","review_comment_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/5/comments","statuses_url":"https://api.github.com/repos/duychinh1995/sample_app/statuses/acf00ecaf3561fb7718af8604ade108e466fc4f8","head":{"label":"duychinh1995:chapter_6","ref":"chapter_6","sha":"acf00ecaf3561fb7718af8604ade108e466fc4f8","user":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"repo":{"id":128165254,"name":"sample_app","full_name":"duychinh1995/sample_app","owner":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/duychinh1995/sample_app","description":"Ruby on rails traing project","fork":false,"url":"https://api.github.com/repos/duychinh1995/sample_app","forks_url":"https://api.github.com/repos/duychinh1995/sample_app/forks","keys_url":"https://api.github.com/repos/duychinh1995/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duychinh1995/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duychinh1995/sample_app/teams","hooks_url":"https://api.github.com/repos/duychinh1995/sample_app/hooks","issue_events_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/duychinh1995/sample_app/events","assignees_url":"https://api.github.com/repos/duychinh1995/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/duychinh1995/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/duychinh1995/sample_app/tags","blobs_url":"https://api.github.com/repos/duychinh1995/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duychinh1995/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duychinh1995/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/duychinh1995/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duychinh1995/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/duychinh1995/sample_app/languages","stargazers_url":"https://api.github.com/repos/duychinh1995/sample_app/stargazers","contributors_url":"https://api.github.com/repos/duychinh1995/sample_app/contributors","subscribers_url":"https://api.github.com/repos/duychinh1995/sample_app/subscribers","subscription_url":"https://api.github.com/repos/duychinh1995/sample_app/subscription","commits_url":"https://api.github.com/repos/duychinh1995/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/duychinh1995/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/duychinh1995/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/duychinh1995/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/duychinh1995/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duychinh1995/sample_app/merges","archive_url":"https://api.github.com/repos/duychinh1995/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duychinh1995/sample_app/downloads","issues_url":"https://api.github.com/repos/duychinh1995/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/duychinh1995/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/duychinh1995/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duychinh1995/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/duychinh1995/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/duychinh1995/sample_app/deployments","created_at":"2018-04-05T05:59:09Z","updated_at":"2018-04-09T04:46:04Z","pushed_at":"2018-04-09T06:56:18Z","git_url":"git://github.com/duychinh1995/sample_app.git","ssh_url":"git@github.com:duychinh1995/sample_app.git","clone_url":"https://github.com/duychinh1995/sample_app.git","svn_url":"https://github.com/duychinh1995/sample_app","homepage":null,"size":56,"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":"duychinh1995:master","ref":"master","sha":"acf1c75b3c8f8310da9d5422540fa6f7f0bcf4be","user":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"repo":{"id":128165254,"name":"sample_app","full_name":"duychinh1995/sample_app","owner":{"login":"duychinh1995","id":37787299,"avatar_url":"https://avatars3.githubusercontent.com/u/37787299?v=4","gravatar_id":"","url":"https://api.github.com/users/duychinh1995","html_url":"https://github.com/duychinh1995","followers_url":"https://api.github.com/users/duychinh1995/followers","following_url":"https://api.github.com/users/duychinh1995/following{/other_user}","gists_url":"https://api.github.com/users/duychinh1995/gists{/gist_id}","starred_url":"https://api.github.com/users/duychinh1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duychinh1995/subscriptions","organizations_url":"https://api.github.com/users/duychinh1995/orgs","repos_url":"https://api.github.com/users/duychinh1995/repos","events_url":"https://api.github.com/users/duychinh1995/events{/privacy}","received_events_url":"https://api.github.com/users/duychinh1995/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/duychinh1995/sample_app","description":"Ruby on rails traing project","fork":false,"url":"https://api.github.com/repos/duychinh1995/sample_app","forks_url":"https://api.github.com/repos/duychinh1995/sample_app/forks","keys_url":"https://api.github.com/repos/duychinh1995/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duychinh1995/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duychinh1995/sample_app/teams","hooks_url":"https://api.github.com/repos/duychinh1995/sample_app/hooks","issue_events_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/duychinh1995/sample_app/events","assignees_url":"https://api.github.com/repos/duychinh1995/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/duychinh1995/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/duychinh1995/sample_app/tags","blobs_url":"https://api.github.com/repos/duychinh1995/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duychinh1995/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duychinh1995/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/duychinh1995/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duychinh1995/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/duychinh1995/sample_app/languages","stargazers_url":"https://api.github.com/repos/duychinh1995/sample_app/stargazers","contributors_url":"https://api.github.com/repos/duychinh1995/sample_app/contributors","subscribers_url":"https://api.github.com/repos/duychinh1995/sample_app/subscribers","subscription_url":"https://api.github.com/repos/duychinh1995/sample_app/subscription","commits_url":"https://api.github.com/repos/duychinh1995/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/duychinh1995/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/duychinh1995/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/duychinh1995/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/duychinh1995/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/duychinh1995/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duychinh1995/sample_app/merges","archive_url":"https://api.github.com/repos/duychinh1995/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duychinh1995/sample_app/downloads","issues_url":"https://api.github.com/repos/duychinh1995/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/duychinh1995/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/duychinh1995/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/duychinh1995/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duychinh1995/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/duychinh1995/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/duychinh1995/sample_app/deployments","created_at":"2018-04-05T05:59:09Z","updated_at":"2018-04-09T04:46:04Z","pushed_at":"2018-04-09T06:56:18Z","git_url":"git://github.com/duychinh1995/sample_app.git","ssh_url":"git@github.com:duychinh1995/sample_app.git","clone_url":"https://github.com/duychinh1995/sample_app.git","svn_url":"https://github.com/duychinh1995/sample_app","homepage":null,"size":56,"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/duychinh1995/sample_app/pulls/5"},"html":{"href":"https://github.com/duychinh1995/sample_app/pull/5"},"issue":{"href":"https://api.github.com/repos/duychinh1995/sample_app/issues/5"},"comments":{"href":"https://api.github.com/repos/duychinh1995/sample_app/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/duychinh1995/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duychinh1995/sample_app/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/duychinh1995/sample_app/statuses/acf00ecaf3561fb7718af8604ade108e466fc4f8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"duychinh1995"}}