GitHub PullRequestReviewCommentEvent at 2014-12-18 16:35:41
Repository: repo
Actor: damithc
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/22052983","id":22052983,"diff_hunk":"@@ -396,6 +396,34 @@ public String getTeamNameForEmail(String email) {\n         }\n     }\n     \n+    /**\n+     * Returns the displayable email from the given email if it belongs to a user but not a team or anonymous.\n+     * @return  The given email it is displayable. Otherwise, \"-\" is returned.\n+     */\n+    public String getDisplayableEmail(String email) {\n+        if (isEmailOfPerson(email) && !isAnonymousEmail(email)) {\n+            return email;\n+        } else {\n+            return \"-\";\n+        }\n+    }\n+    \n+    private boolean isEmailOfPerson(String email){\n+        String name = emailNameTable.get(email);\n+        boolean isNameForEmail = ( name == null ? false : name.equals(email) );\n+        boolean isTeamForName = ( name == null ? false : name.equals(Const.USER_IS_TEAM) );\n+       \n+        String teamName = emailTeamNameTable.get(email);\n+        boolean isTeamNameForEmail = ( teamName == null ? false : teamName.equals(email) );\n+        \n+        return !(isNameForEmail || isTeamNameForEmail || isTeamForName);\n+    }\n+    \n+    private boolean isAnonymousEmail(String email){","path":"src/main/java/teammates/common/datatransfer/FeedbackSessionResultsBundle.java","position":27,"original_position":27,"commit_id":"5a696cafa9b9d1804fa3ffa4d9dcd98f0521fe47","original_commit_id":"5a696cafa9b9d1804fa3ffa4d9dcd98f0521fe47","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"'anonymous email' sounds odd :-p","created_at":"2014-12-18T16:35:41Z","updated_at":"2014-12-18T16:35:41Z","html_url":"https://github.com/TEAMMATES/repo/pull/2753#discussion_r22052983","pull_request_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/22052983"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/2753#discussion_r22052983"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753","id":26018393,"html_url":"https://github.com/TEAMMATES/repo/pull/2753","diff_url":"https://github.com/TEAMMATES/repo/pull/2753.diff","patch_url":"https://github.com/TEAMMATES/repo/pull/2753.patch","issue_url":"https://api.github.com/repos/TEAMMATES/repo/issues/2753","number":2753,"state":"open","locked":false,"title":"Add student email to the results spreadsheet   #2582","user":{"login":"rcyq","id":6453214,"avatar_url":"https://avatars.githubusercontent.com/u/6453214?v=3","gravatar_id":"","url":"https://api.github.com/users/rcyq","html_url":"https://github.com/rcyq","followers_url":"https://api.github.com/users/rcyq/followers","following_url":"https://api.github.com/users/rcyq/following{/other_user}","gists_url":"https://api.github.com/users/rcyq/gists{/gist_id}","starred_url":"https://api.github.com/users/rcyq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcyq/subscriptions","organizations_url":"https://api.github.com/users/rcyq/orgs","repos_url":"https://api.github.com/users/rcyq/repos","events_url":"https://api.github.com/users/rcyq/events{/privacy}","received_events_url":"https://api.github.com/users/rcyq/received_events","type":"User","site_admin":false},"body":"Fixes for adding student email next to student name in CSV file generation","created_at":"2014-12-13T07:15:56Z","updated_at":"2014-12-18T16:35:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41c44e2114549e5727b4a7477dc11899feaa96bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/2753/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/5a696cafa9b9d1804fa3ffa4d9dcd98f0521fe47","head":{"label":"TEAMMATES:Issues2582","ref":"Issues2582","sha":"5a696cafa9b9d1804fa3ffa4d9dcd98f0521fe47","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments/{number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2014-12-18T11:47:27Z","pushed_at":"2014-12-18T16:18:46Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"","size":114768,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":486,"forks":19,"open_issues":486,"watchers":23,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"b22b8638119c5bb1903fd7b4b821721d34bfc429","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments/{number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2014-12-18T11:47:27Z","pushed_at":"2014-12-18T16:18:46Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"","size":114768,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":486,"forks":19,"open_issues":486,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/2753"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/2753"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/2753/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/2753/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/repo/statuses/5a696cafa9b9d1804fa3ffa4d9dcd98f0521fe47"}}}}