{"action":"created","comment":{"url":"https://api.github.com/repos/tnminh00/sample_app/pulls/comments/339884622","pull_request_review_id":308263500,"id":339884622,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzOTg4NDYyMg==","diff_hunk":"@@ -0,0 +1,20 @@\n+module SessionsHelper\n+  def log_in(user)\n+    session[:user_id] = user.id\n+  end\n+\n+  def current_user\n+    if session[:user_id]\n+        @current_user ||= User.find_by id: session[:user_id]","path":"app/helpers/sessions_helper.rb","position":8,"original_position":8,"commit_id":"93bddf2badd551858d3aa4b7f5174b23de8e4e85","original_commit_id":"b5ff4425503a3fea3e53ff14e864cedcf431d0c8","user":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"body":"Nếu @curent_user tồn tại rồi thì nó sẽ không thực hiện gán nữa ạ","created_at":"2019-10-29T03:52:37Z","updated_at":"2019-10-29T03:52:37Z","html_url":"https://github.com/tnminh00/sample_app/pull/7#discussion_r339884622","pull_request_url":"https://api.github.com/repos/tnminh00/sample_app/pulls/7","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tnminh00/sample_app/pulls/comments/339884622"},"html":{"href":"https://github.com/tnminh00/sample_app/pull/7#discussion_r339884622"},"pull_request":{"href":"https://api.github.com/repos/tnminh00/sample_app/pulls/7"}},"in_reply_to_id":339575677},"pull_request":{"url":"https://api.github.com/repos/tnminh00/sample_app/pulls/7","id":333106530,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMzMTA2NTMw","html_url":"https://github.com/tnminh00/sample_app/pull/7","diff_url":"https://github.com/tnminh00/sample_app/pull/7.diff","patch_url":"https://github.com/tnminh00/sample_app/pull/7.patch","issue_url":"https://api.github.com/repos/tnminh00/sample_app/issues/7","number":7,"state":"open","locked":false,"title":"Basic login","user":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-10-28T13:08:18Z","updated_at":"2019-10-29T03:52:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"beec69e2868c1117e753834909a6901527be74c4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tnminh00/sample_app/pulls/7/commits","review_comments_url":"https://api.github.com/repos/tnminh00/sample_app/pulls/7/comments","review_comment_url":"https://api.github.com/repos/tnminh00/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tnminh00/sample_app/issues/7/comments","statuses_url":"https://api.github.com/repos/tnminh00/sample_app/statuses/93bddf2badd551858d3aa4b7f5174b23de8e4e85","head":{"label":"tnminh00:basic-login","ref":"basic-login","sha":"93bddf2badd551858d3aa4b7f5174b23de8e4e85","user":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"repo":{"id":215222116,"node_id":"MDEwOlJlcG9zaXRvcnkyMTUyMjIxMTY=","name":"sample_app","full_name":"tnminh00/sample_app","private":false,"owner":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tnminh00/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/tnminh00/sample_app","forks_url":"https://api.github.com/repos/tnminh00/sample_app/forks","keys_url":"https://api.github.com/repos/tnminh00/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tnminh00/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tnminh00/sample_app/teams","hooks_url":"https://api.github.com/repos/tnminh00/sample_app/hooks","issue_events_url":"https://api.github.com/repos/tnminh00/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/tnminh00/sample_app/events","assignees_url":"https://api.github.com/repos/tnminh00/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/tnminh00/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/tnminh00/sample_app/tags","blobs_url":"https://api.github.com/repos/tnminh00/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tnminh00/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tnminh00/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/tnminh00/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tnminh00/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/tnminh00/sample_app/languages","stargazers_url":"https://api.github.com/repos/tnminh00/sample_app/stargazers","contributors_url":"https://api.github.com/repos/tnminh00/sample_app/contributors","subscribers_url":"https://api.github.com/repos/tnminh00/sample_app/subscribers","subscription_url":"https://api.github.com/repos/tnminh00/sample_app/subscription","commits_url":"https://api.github.com/repos/tnminh00/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/tnminh00/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/tnminh00/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/tnminh00/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/tnminh00/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/tnminh00/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tnminh00/sample_app/merges","archive_url":"https://api.github.com/repos/tnminh00/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tnminh00/sample_app/downloads","issues_url":"https://api.github.com/repos/tnminh00/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/tnminh00/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/tnminh00/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/tnminh00/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tnminh00/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/tnminh00/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/tnminh00/sample_app/deployments","created_at":"2019-10-15T06:20:57Z","updated_at":"2019-10-28T11:22:45Z","pushed_at":"2019-10-29T01:41:39Z","git_url":"git://github.com/tnminh00/sample_app.git","ssh_url":"git@github.com:tnminh00/sample_app.git","clone_url":"https://github.com/tnminh00/sample_app.git","svn_url":"https://github.com/tnminh00/sample_app","homepage":null,"size":63,"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,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tnminh00:master","ref":"master","sha":"95e88d0807f940a7fb26380789b42ed2f1a670a3","user":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"repo":{"id":215222116,"node_id":"MDEwOlJlcG9zaXRvcnkyMTUyMjIxMTY=","name":"sample_app","full_name":"tnminh00/sample_app","private":false,"owner":{"login":"tnminh00","id":39358652,"node_id":"MDQ6VXNlcjM5MzU4NjUy","avatar_url":"https://avatars1.githubusercontent.com/u/39358652?v=4","gravatar_id":"","url":"https://api.github.com/users/tnminh00","html_url":"https://github.com/tnminh00","followers_url":"https://api.github.com/users/tnminh00/followers","following_url":"https://api.github.com/users/tnminh00/following{/other_user}","gists_url":"https://api.github.com/users/tnminh00/gists{/gist_id}","starred_url":"https://api.github.com/users/tnminh00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnminh00/subscriptions","organizations_url":"https://api.github.com/users/tnminh00/orgs","repos_url":"https://api.github.com/users/tnminh00/repos","events_url":"https://api.github.com/users/tnminh00/events{/privacy}","received_events_url":"https://api.github.com/users/tnminh00/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tnminh00/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/tnminh00/sample_app","forks_url":"https://api.github.com/repos/tnminh00/sample_app/forks","keys_url":"https://api.github.com/repos/tnminh00/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tnminh00/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tnminh00/sample_app/teams","hooks_url":"https://api.github.com/repos/tnminh00/sample_app/hooks","issue_events_url":"https://api.github.com/repos/tnminh00/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/tnminh00/sample_app/events","assignees_url":"https://api.github.com/repos/tnminh00/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/tnminh00/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/tnminh00/sample_app/tags","blobs_url":"https://api.github.com/repos/tnminh00/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tnminh00/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tnminh00/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/tnminh00/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tnminh00/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/tnminh00/sample_app/languages","stargazers_url":"https://api.github.com/repos/tnminh00/sample_app/stargazers","contributors_url":"https://api.github.com/repos/tnminh00/sample_app/contributors","subscribers_url":"https://api.github.com/repos/tnminh00/sample_app/subscribers","subscription_url":"https://api.github.com/repos/tnminh00/sample_app/subscription","commits_url":"https://api.github.com/repos/tnminh00/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/tnminh00/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/tnminh00/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/tnminh00/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/tnminh00/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/tnminh00/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tnminh00/sample_app/merges","archive_url":"https://api.github.com/repos/tnminh00/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tnminh00/sample_app/downloads","issues_url":"https://api.github.com/repos/tnminh00/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/tnminh00/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/tnminh00/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/tnminh00/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tnminh00/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/tnminh00/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/tnminh00/sample_app/deployments","created_at":"2019-10-15T06:20:57Z","updated_at":"2019-10-28T11:22:45Z","pushed_at":"2019-10-29T01:41:39Z","git_url":"git://github.com/tnminh00/sample_app.git","ssh_url":"git@github.com:tnminh00/sample_app.git","clone_url":"https://github.com/tnminh00/sample_app.git","svn_url":"https://github.com/tnminh00/sample_app","homepage":null,"size":63,"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,"disabled":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/tnminh00/sample_app/pulls/7"},"html":{"href":"https://github.com/tnminh00/sample_app/pull/7"},"issue":{"href":"https://api.github.com/repos/tnminh00/sample_app/issues/7"},"comments":{"href":"https://api.github.com/repos/tnminh00/sample_app/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/tnminh00/sample_app/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/tnminh00/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tnminh00/sample_app/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/tnminh00/sample_app/statuses/93bddf2badd551858d3aa4b7f5174b23de8e4e85"}},"author_association":"OWNER"}}
{"actor":{"display_login":"tnminh00"}}