{"action":"created","comment":{"url":"https://api.github.com/repos/erpnext/hub/pulls/comments/202582050","pull_request_review_id":137309344,"id":202582050,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjU4MjA1MA==","diff_hunk":"@@ -7,4 +7,8 @@\n from frappe.model.document import Document\n \n class HubItemReview(Document):\n-\tpass\n+\n+    def before_naming(self):\n+        if self.user:\n+            user = frappe.get_doc('User', self.user)\n+            self.username = user.full_name or user.username or None","path":"hub/hub/doctype/hub_item_review/hub_item_review.py","position":9,"original_position":9,"commit_id":"724a6eafe22231e66e63db45cd51c0b05298a14d","original_commit_id":"2737994e02740d5be20d28dda266e813d2cb9c67","user":{"login":"pratu16x7","id":5196925,"node_id":"MDQ6VXNlcjUxOTY5MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/5196925?v=4","gravatar_id":"","url":"https://api.github.com/users/pratu16x7","html_url":"https://github.com/pratu16x7","followers_url":"https://api.github.com/users/pratu16x7/followers","following_url":"https://api.github.com/users/pratu16x7/following{/other_user}","gists_url":"https://api.github.com/users/pratu16x7/gists{/gist_id}","starred_url":"https://api.github.com/users/pratu16x7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratu16x7/subscriptions","organizations_url":"https://api.github.com/users/pratu16x7/orgs","repos_url":"https://api.github.com/users/pratu16x7/repos","events_url":"https://api.github.com/users/pratu16x7/events{/privacy}","received_events_url":"https://api.github.com/users/pratu16x7/received_events","type":"User","site_admin":false},"body":"A helper in the User doctype would do I feel, to `get_name()`","created_at":"2018-07-16T06:31:56Z","updated_at":"2018-07-16T06:31:56Z","html_url":"https://github.com/erpnext/hub/pull/40#discussion_r202582050","pull_request_url":"https://api.github.com/repos/erpnext/hub/pulls/40","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/erpnext/hub/pulls/comments/202582050"},"html":{"href":"https://github.com/erpnext/hub/pull/40#discussion_r202582050"},"pull_request":{"href":"https://api.github.com/repos/erpnext/hub/pulls/40"}},"in_reply_to_id":202512340},"pull_request":{"url":"https://api.github.com/repos/erpnext/hub/pulls/40","id":201324347,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzI0MzQ3","html_url":"https://github.com/erpnext/hub/pull/40","diff_url":"https://github.com/erpnext/hub/pull/40.diff","patch_url":"https://github.com/erpnext/hub/pull/40.patch","issue_url":"https://api.github.com/repos/erpnext/hub/issues/40","number":40,"state":"open","locked":false,"title":"Add reviews","user":{"login":"akshar-raaj","id":889120,"node_id":"MDQ6VXNlcjg4OTEyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/889120?v=4","gravatar_id":"","url":"https://api.github.com/users/akshar-raaj","html_url":"https://github.com/akshar-raaj","followers_url":"https://api.github.com/users/akshar-raaj/followers","following_url":"https://api.github.com/users/akshar-raaj/following{/other_user}","gists_url":"https://api.github.com/users/akshar-raaj/gists{/gist_id}","starred_url":"https://api.github.com/users/akshar-raaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshar-raaj/subscriptions","organizations_url":"https://api.github.com/users/akshar-raaj/orgs","repos_url":"https://api.github.com/users/akshar-raaj/repos","events_url":"https://api.github.com/users/akshar-raaj/events{/privacy}","received_events_url":"https://api.github.com/users/akshar-raaj/received_events","type":"User","site_admin":false},"body":"* Added review on detail page.\r\n\r\n* Setting hub_item_review.username using before_naming() hook.\r\n\r\n<img width=\"1265\" alt=\"reviews\" src=\"https://user-images.githubusercontent.com/889120/42722645-2fda57b0-876d-11e8-8e17-58604ac6d65b.png\">\r\n<img width=\"1219\" alt=\"skitch\" src=\"https://user-images.githubusercontent.com/889120/42722646-313d59fe-876d-11e8-9bfd-973cbf3b6138.png\">\r\n","created_at":"2018-07-13T15:25:22Z","updated_at":"2018-07-16T06:31:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9683584abb0b0080099a62d05b2974203cfcab25","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rmehta","id":140076,"node_id":"MDQ6VXNlcjE0MDA3Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/140076?v=4","gravatar_id":"","url":"https://api.github.com/users/rmehta","html_url":"https://github.com/rmehta","followers_url":"https://api.github.com/users/rmehta/followers","following_url":"https://api.github.com/users/rmehta/following{/other_user}","gists_url":"https://api.github.com/users/rmehta/gists{/gist_id}","starred_url":"https://api.github.com/users/rmehta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmehta/subscriptions","organizations_url":"https://api.github.com/users/rmehta/orgs","repos_url":"https://api.github.com/users/rmehta/repos","events_url":"https://api.github.com/users/rmehta/events{/privacy}","received_events_url":"https://api.github.com/users/rmehta/received_events","type":"User","site_admin":false},{"login":"pratu16x7","id":5196925,"node_id":"MDQ6VXNlcjUxOTY5MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/5196925?v=4","gravatar_id":"","url":"https://api.github.com/users/pratu16x7","html_url":"https://github.com/pratu16x7","followers_url":"https://api.github.com/users/pratu16x7/followers","following_url":"https://api.github.com/users/pratu16x7/following{/other_user}","gists_url":"https://api.github.com/users/pratu16x7/gists{/gist_id}","starred_url":"https://api.github.com/users/pratu16x7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratu16x7/subscriptions","organizations_url":"https://api.github.com/users/pratu16x7/orgs","repos_url":"https://api.github.com/users/pratu16x7/repos","events_url":"https://api.github.com/users/pratu16x7/events{/privacy}","received_events_url":"https://api.github.com/users/pratu16x7/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/erpnext/hub/pulls/40/commits","review_comments_url":"https://api.github.com/repos/erpnext/hub/pulls/40/comments","review_comment_url":"https://api.github.com/repos/erpnext/hub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erpnext/hub/issues/40/comments","statuses_url":"https://api.github.com/repos/erpnext/hub/statuses/724a6eafe22231e66e63db45cd51c0b05298a14d","head":{"label":"erpnext:add_reviews","ref":"add_reviews","sha":"724a6eafe22231e66e63db45cd51c0b05298a14d","user":{"login":"erpnext","id":5070868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA4Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/5070868?v=4","gravatar_id":"","url":"https://api.github.com/users/erpnext","html_url":"https://github.com/erpnext","followers_url":"https://api.github.com/users/erpnext/followers","following_url":"https://api.github.com/users/erpnext/following{/other_user}","gists_url":"https://api.github.com/users/erpnext/gists{/gist_id}","starred_url":"https://api.github.com/users/erpnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpnext/subscriptions","organizations_url":"https://api.github.com/users/erpnext/orgs","repos_url":"https://api.github.com/users/erpnext/repos","events_url":"https://api.github.com/users/erpnext/events{/privacy}","received_events_url":"https://api.github.com/users/erpnext/received_events","type":"Organization","site_admin":false},"repo":{"id":84916423,"node_id":"MDEwOlJlcG9zaXRvcnk4NDkxNjQyMw==","name":"hub","full_name":"erpnext/hub","owner":{"login":"erpnext","id":5070868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA4Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/5070868?v=4","gravatar_id":"","url":"https://api.github.com/users/erpnext","html_url":"https://github.com/erpnext","followers_url":"https://api.github.com/users/erpnext/followers","following_url":"https://api.github.com/users/erpnext/following{/other_user}","gists_url":"https://api.github.com/users/erpnext/gists{/gist_id}","starred_url":"https://api.github.com/users/erpnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpnext/subscriptions","organizations_url":"https://api.github.com/users/erpnext/orgs","repos_url":"https://api.github.com/users/erpnext/repos","events_url":"https://api.github.com/users/erpnext/events{/privacy}","received_events_url":"https://api.github.com/users/erpnext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/erpnext/hub","description":null,"fork":false,"url":"https://api.github.com/repos/erpnext/hub","forks_url":"https://api.github.com/repos/erpnext/hub/forks","keys_url":"https://api.github.com/repos/erpnext/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erpnext/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erpnext/hub/teams","hooks_url":"https://api.github.com/repos/erpnext/hub/hooks","issue_events_url":"https://api.github.com/repos/erpnext/hub/issues/events{/number}","events_url":"https://api.github.com/repos/erpnext/hub/events","assignees_url":"https://api.github.com/repos/erpnext/hub/assignees{/user}","branches_url":"https://api.github.com/repos/erpnext/hub/branches{/branch}","tags_url":"https://api.github.com/repos/erpnext/hub/tags","blobs_url":"https://api.github.com/repos/erpnext/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erpnext/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erpnext/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/erpnext/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erpnext/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/erpnext/hub/languages","stargazers_url":"https://api.github.com/repos/erpnext/hub/stargazers","contributors_url":"https://api.github.com/repos/erpnext/hub/contributors","subscribers_url":"https://api.github.com/repos/erpnext/hub/subscribers","subscription_url":"https://api.github.com/repos/erpnext/hub/subscription","commits_url":"https://api.github.com/repos/erpnext/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/erpnext/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/erpnext/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/erpnext/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/erpnext/hub/contents/{+path}","compare_url":"https://api.github.com/repos/erpnext/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erpnext/hub/merges","archive_url":"https://api.github.com/repos/erpnext/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erpnext/hub/downloads","issues_url":"https://api.github.com/repos/erpnext/hub/issues{/number}","pulls_url":"https://api.github.com/repos/erpnext/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/erpnext/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/erpnext/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erpnext/hub/labels{/name}","releases_url":"https://api.github.com/repos/erpnext/hub/releases{/id}","deployments_url":"https://api.github.com/repos/erpnext/hub/deployments","created_at":"2017-03-14T07:00:41Z","updated_at":"2018-03-12T13:40:19Z","pushed_at":"2018-07-14T14:16:16Z","git_url":"git://github.com/erpnext/hub.git","ssh_url":"git@github.com:erpnext/hub.git","clone_url":"https://github.com/erpnext/hub.git","svn_url":"https://github.com/erpnext/hub","homepage":null,"size":508,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":5,"watchers":9,"default_branch":"master"}},"base":{"label":"erpnext:develop","ref":"develop","sha":"7b7190b56b309f92720c4c0a1874ebd644d69ee1","user":{"login":"erpnext","id":5070868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA4Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/5070868?v=4","gravatar_id":"","url":"https://api.github.com/users/erpnext","html_url":"https://github.com/erpnext","followers_url":"https://api.github.com/users/erpnext/followers","following_url":"https://api.github.com/users/erpnext/following{/other_user}","gists_url":"https://api.github.com/users/erpnext/gists{/gist_id}","starred_url":"https://api.github.com/users/erpnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpnext/subscriptions","organizations_url":"https://api.github.com/users/erpnext/orgs","repos_url":"https://api.github.com/users/erpnext/repos","events_url":"https://api.github.com/users/erpnext/events{/privacy}","received_events_url":"https://api.github.com/users/erpnext/received_events","type":"Organization","site_admin":false},"repo":{"id":84916423,"node_id":"MDEwOlJlcG9zaXRvcnk4NDkxNjQyMw==","name":"hub","full_name":"erpnext/hub","owner":{"login":"erpnext","id":5070868,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwNzA4Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/5070868?v=4","gravatar_id":"","url":"https://api.github.com/users/erpnext","html_url":"https://github.com/erpnext","followers_url":"https://api.github.com/users/erpnext/followers","following_url":"https://api.github.com/users/erpnext/following{/other_user}","gists_url":"https://api.github.com/users/erpnext/gists{/gist_id}","starred_url":"https://api.github.com/users/erpnext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erpnext/subscriptions","organizations_url":"https://api.github.com/users/erpnext/orgs","repos_url":"https://api.github.com/users/erpnext/repos","events_url":"https://api.github.com/users/erpnext/events{/privacy}","received_events_url":"https://api.github.com/users/erpnext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/erpnext/hub","description":null,"fork":false,"url":"https://api.github.com/repos/erpnext/hub","forks_url":"https://api.github.com/repos/erpnext/hub/forks","keys_url":"https://api.github.com/repos/erpnext/hub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erpnext/hub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erpnext/hub/teams","hooks_url":"https://api.github.com/repos/erpnext/hub/hooks","issue_events_url":"https://api.github.com/repos/erpnext/hub/issues/events{/number}","events_url":"https://api.github.com/repos/erpnext/hub/events","assignees_url":"https://api.github.com/repos/erpnext/hub/assignees{/user}","branches_url":"https://api.github.com/repos/erpnext/hub/branches{/branch}","tags_url":"https://api.github.com/repos/erpnext/hub/tags","blobs_url":"https://api.github.com/repos/erpnext/hub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erpnext/hub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erpnext/hub/git/refs{/sha}","trees_url":"https://api.github.com/repos/erpnext/hub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erpnext/hub/statuses/{sha}","languages_url":"https://api.github.com/repos/erpnext/hub/languages","stargazers_url":"https://api.github.com/repos/erpnext/hub/stargazers","contributors_url":"https://api.github.com/repos/erpnext/hub/contributors","subscribers_url":"https://api.github.com/repos/erpnext/hub/subscribers","subscription_url":"https://api.github.com/repos/erpnext/hub/subscription","commits_url":"https://api.github.com/repos/erpnext/hub/commits{/sha}","git_commits_url":"https://api.github.com/repos/erpnext/hub/git/commits{/sha}","comments_url":"https://api.github.com/repos/erpnext/hub/comments{/number}","issue_comment_url":"https://api.github.com/repos/erpnext/hub/issues/comments{/number}","contents_url":"https://api.github.com/repos/erpnext/hub/contents/{+path}","compare_url":"https://api.github.com/repos/erpnext/hub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erpnext/hub/merges","archive_url":"https://api.github.com/repos/erpnext/hub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erpnext/hub/downloads","issues_url":"https://api.github.com/repos/erpnext/hub/issues{/number}","pulls_url":"https://api.github.com/repos/erpnext/hub/pulls{/number}","milestones_url":"https://api.github.com/repos/erpnext/hub/milestones{/number}","notifications_url":"https://api.github.com/repos/erpnext/hub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erpnext/hub/labels{/name}","releases_url":"https://api.github.com/repos/erpnext/hub/releases{/id}","deployments_url":"https://api.github.com/repos/erpnext/hub/deployments","created_at":"2017-03-14T07:00:41Z","updated_at":"2018-03-12T13:40:19Z","pushed_at":"2018-07-14T14:16:16Z","git_url":"git://github.com/erpnext/hub.git","ssh_url":"git@github.com:erpnext/hub.git","clone_url":"https://github.com/erpnext/hub.git","svn_url":"https://github.com/erpnext/hub","homepage":null,"size":508,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":5,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erpnext/hub/pulls/40"},"html":{"href":"https://github.com/erpnext/hub/pull/40"},"issue":{"href":"https://api.github.com/repos/erpnext/hub/issues/40"},"comments":{"href":"https://api.github.com/repos/erpnext/hub/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/erpnext/hub/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/erpnext/hub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erpnext/hub/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/erpnext/hub/statuses/724a6eafe22231e66e63db45cd51c0b05298a14d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"pratu16x7"}}