{"action":"created","comment":{"url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/comments/196596837","pull_request_review_id":130181242,"id":196596837,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjU5NjgzNw==","diff_hunk":"@@ -160,7 +170,7 @@ private static User getMostRecentUser(List<User> users) {\n         recent = user;\n       }\n     }\n-    return recent;\n+    return users.stream().max(Comparator.comparing(user -> user.getCreationTime())).orElse(null);","path":"src/main/java/codeu/controller/AdminServlet.java","position":null,"original_position":157,"commit_id":"6f62878a36c4775c98da74c34ac02f286bead8c2","original_commit_id":"6f62878a36c4775c98da74c34ac02f286bead8c2","user":{"login":"lukemujica","id":20426701,"node_id":"MDQ6VXNlcjIwNDI2NzAx","avatar_url":"https://avatars2.githubusercontent.com/u/20426701?v=4","gravatar_id":"","url":"https://api.github.com/users/lukemujica","html_url":"https://github.com/lukemujica","followers_url":"https://api.github.com/users/lukemujica/followers","following_url":"https://api.github.com/users/lukemujica/following{/other_user}","gists_url":"https://api.github.com/users/lukemujica/gists{/gist_id}","starred_url":"https://api.github.com/users/lukemujica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukemujica/subscriptions","organizations_url":"https://api.github.com/users/lukemujica/orgs","repos_url":"https://api.github.com/users/lukemujica/repos","events_url":"https://api.github.com/users/lukemujica/events{/privacy}","received_events_url":"https://api.github.com/users/lukemujica/received_events","type":"User","site_admin":false},"body":"You're right I was just testing it first and forgot to remove everything - thanks!","created_at":"2018-06-19T22:18:45Z","updated_at":"2018-06-19T22:18:45Z","html_url":"https://github.com/edreichua/CodeU-Summer-2018/pull/22#discussion_r196596837","pull_request_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/comments/196596837"},"html":{"href":"https://github.com/edreichua/CodeU-Summer-2018/pull/22#discussion_r196596837"},"pull_request":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22"}},"in_reply_to_id":196577480},"pull_request":{"url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22","id":193102749,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTAyNzQ5","html_url":"https://github.com/edreichua/CodeU-Summer-2018/pull/22","diff_url":"https://github.com/edreichua/CodeU-Summer-2018/pull/22.diff","patch_url":"https://github.com/edreichua/CodeU-Summer-2018/pull/22.patch","issue_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/22","number":22,"state":"open","locked":false,"title":"Admin Page MVP","user":{"login":"lukemujica","id":20426701,"node_id":"MDQ6VXNlcjIwNDI2NzAx","avatar_url":"https://avatars2.githubusercontent.com/u/20426701?v=4","gravatar_id":"","url":"https://api.github.com/users/lukemujica","html_url":"https://github.com/lukemujica","followers_url":"https://api.github.com/users/lukemujica/followers","following_url":"https://api.github.com/users/lukemujica/following{/other_user}","gists_url":"https://api.github.com/users/lukemujica/gists{/gist_id}","starred_url":"https://api.github.com/users/lukemujica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukemujica/subscriptions","organizations_url":"https://api.github.com/users/lukemujica/orgs","repos_url":"https://api.github.com/users/lukemujica/repos","events_url":"https://api.github.com/users/lukemujica/events{/privacy}","received_events_url":"https://api.github.com/users/lukemujica/received_events","type":"User","site_admin":false},"body":"Closes #17 I added three new statistics which I calculated in initializeUserStats inside of AdminServlet.java and then added them to the statistics map which gets sent to admin.jsp for display. \r\n\r\nFor the most recent user I simply looped through all the users and found the User with the most recent creation time.\r\n\r\nThe wordiest user is the user that has the most words in each of their messages on average and the most active user is the user who has sent the most messages total. Both of these required looping through messages so I found them together to save some time. I used a Map that used the UUID of users as the key and integers as the value. One map tracks the number of total messages each user has sent and the other tracks the number of total words each user has sent. Once I made the maps I just looped through them to find the user who had sent the most messages and the user that averaged the highest words per message.\r\n\r\nI also added a lot to AdminServletTest.java to test that statistics were being calculated correctly.","created_at":"2018-06-06T18:35:04Z","updated_at":"2018-06-19T22:18:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b398e0aae226fc9d4fabc2c53ccb3bf340741fd2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"taliabahar","id":20820499,"node_id":"MDQ6VXNlcjIwODIwNDk5","avatar_url":"https://avatars3.githubusercontent.com/u/20820499?v=4","gravatar_id":"","url":"https://api.github.com/users/taliabahar","html_url":"https://github.com/taliabahar","followers_url":"https://api.github.com/users/taliabahar/followers","following_url":"https://api.github.com/users/taliabahar/following{/other_user}","gists_url":"https://api.github.com/users/taliabahar/gists{/gist_id}","starred_url":"https://api.github.com/users/taliabahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taliabahar/subscriptions","organizations_url":"https://api.github.com/users/taliabahar/orgs","repos_url":"https://api.github.com/users/taliabahar/repos","events_url":"https://api.github.com/users/taliabahar/events{/privacy}","received_events_url":"https://api.github.com/users/taliabahar/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22/commits","review_comments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22/comments","review_comment_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/22/comments","statuses_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/statuses/6f62878a36c4775c98da74c34ac02f286bead8c2","head":{"label":"edreichua:AdminPagePrototype","ref":"AdminPagePrototype","sha":"6f62878a36c4775c98da74c34ac02f286bead8c2","user":{"login":"edreichua","id":14172870,"node_id":"MDQ6VXNlcjE0MTcyODcw","avatar_url":"https://avatars0.githubusercontent.com/u/14172870?v=4","gravatar_id":"","url":"https://api.github.com/users/edreichua","html_url":"https://github.com/edreichua","followers_url":"https://api.github.com/users/edreichua/followers","following_url":"https://api.github.com/users/edreichua/following{/other_user}","gists_url":"https://api.github.com/users/edreichua/gists{/gist_id}","starred_url":"https://api.github.com/users/edreichua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edreichua/subscriptions","organizations_url":"https://api.github.com/users/edreichua/orgs","repos_url":"https://api.github.com/users/edreichua/repos","events_url":"https://api.github.com/users/edreichua/events{/privacy}","received_events_url":"https://api.github.com/users/edreichua/received_events","type":"User","site_admin":false},"repo":{"id":130075244,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAwNzUyNDQ=","name":"CodeU-Summer-2018","full_name":"edreichua/CodeU-Summer-2018","owner":{"login":"edreichua","id":14172870,"node_id":"MDQ6VXNlcjE0MTcyODcw","avatar_url":"https://avatars0.githubusercontent.com/u/14172870?v=4","gravatar_id":"","url":"https://api.github.com/users/edreichua","html_url":"https://github.com/edreichua","followers_url":"https://api.github.com/users/edreichua/followers","following_url":"https://api.github.com/users/edreichua/following{/other_user}","gists_url":"https://api.github.com/users/edreichua/gists{/gist_id}","starred_url":"https://api.github.com/users/edreichua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edreichua/subscriptions","organizations_url":"https://api.github.com/users/edreichua/orgs","repos_url":"https://api.github.com/users/edreichua/repos","events_url":"https://api.github.com/users/edreichua/events{/privacy}","received_events_url":"https://api.github.com/users/edreichua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edreichua/CodeU-Summer-2018","description":null,"fork":false,"url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018","forks_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/forks","keys_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/teams","hooks_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/hooks","issue_events_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/events{/number}","events_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/events","assignees_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/assignees{/user}","branches_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/branches{/branch}","tags_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/tags","blobs_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/languages","stargazers_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/stargazers","contributors_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/contributors","subscribers_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/subscribers","subscription_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/subscription","commits_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/contents/{+path}","compare_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/merges","archive_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/downloads","issues_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues{/number}","pulls_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/labels{/name}","releases_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/releases{/id}","deployments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/deployments","created_at":"2018-04-18T14:29:52Z","updated_at":"2018-06-14T06:29:45Z","pushed_at":"2018-06-19T07:57:58Z","git_url":"git://github.com/edreichua/CodeU-Summer-2018.git","ssh_url":"git@github.com:edreichua/CodeU-Summer-2018.git","clone_url":"https://github.com/edreichua/CodeU-Summer-2018.git","svn_url":"https://github.com/edreichua/CodeU-Summer-2018","homepage":null,"size":175,"stargazers_count":0,"watchers_count":0,"language":"Java","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":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"edreichua:master","ref":"master","sha":"d388cc5728c63faf038b35a19c739f9f6eaa657a","user":{"login":"edreichua","id":14172870,"node_id":"MDQ6VXNlcjE0MTcyODcw","avatar_url":"https://avatars0.githubusercontent.com/u/14172870?v=4","gravatar_id":"","url":"https://api.github.com/users/edreichua","html_url":"https://github.com/edreichua","followers_url":"https://api.github.com/users/edreichua/followers","following_url":"https://api.github.com/users/edreichua/following{/other_user}","gists_url":"https://api.github.com/users/edreichua/gists{/gist_id}","starred_url":"https://api.github.com/users/edreichua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edreichua/subscriptions","organizations_url":"https://api.github.com/users/edreichua/orgs","repos_url":"https://api.github.com/users/edreichua/repos","events_url":"https://api.github.com/users/edreichua/events{/privacy}","received_events_url":"https://api.github.com/users/edreichua/received_events","type":"User","site_admin":false},"repo":{"id":130075244,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAwNzUyNDQ=","name":"CodeU-Summer-2018","full_name":"edreichua/CodeU-Summer-2018","owner":{"login":"edreichua","id":14172870,"node_id":"MDQ6VXNlcjE0MTcyODcw","avatar_url":"https://avatars0.githubusercontent.com/u/14172870?v=4","gravatar_id":"","url":"https://api.github.com/users/edreichua","html_url":"https://github.com/edreichua","followers_url":"https://api.github.com/users/edreichua/followers","following_url":"https://api.github.com/users/edreichua/following{/other_user}","gists_url":"https://api.github.com/users/edreichua/gists{/gist_id}","starred_url":"https://api.github.com/users/edreichua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edreichua/subscriptions","organizations_url":"https://api.github.com/users/edreichua/orgs","repos_url":"https://api.github.com/users/edreichua/repos","events_url":"https://api.github.com/users/edreichua/events{/privacy}","received_events_url":"https://api.github.com/users/edreichua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edreichua/CodeU-Summer-2018","description":null,"fork":false,"url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018","forks_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/forks","keys_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/teams","hooks_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/hooks","issue_events_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/events{/number}","events_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/events","assignees_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/assignees{/user}","branches_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/branches{/branch}","tags_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/tags","blobs_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/refs{/sha}","trees_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/statuses/{sha}","languages_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/languages","stargazers_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/stargazers","contributors_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/contributors","subscribers_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/subscribers","subscription_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/subscription","commits_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/commits{/sha}","git_commits_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/git/commits{/sha}","comments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/comments{/number}","issue_comment_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/comments{/number}","contents_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/contents/{+path}","compare_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/merges","archive_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/downloads","issues_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues{/number}","pulls_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls{/number}","milestones_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/milestones{/number}","notifications_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/labels{/name}","releases_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/releases{/id}","deployments_url":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/deployments","created_at":"2018-04-18T14:29:52Z","updated_at":"2018-06-14T06:29:45Z","pushed_at":"2018-06-19T07:57:58Z","git_url":"git://github.com/edreichua/CodeU-Summer-2018.git","ssh_url":"git@github.com:edreichua/CodeU-Summer-2018.git","clone_url":"https://github.com/edreichua/CodeU-Summer-2018.git","svn_url":"https://github.com/edreichua/CodeU-Summer-2018","homepage":null,"size":175,"stargazers_count":0,"watchers_count":0,"language":"Java","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":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22"},"html":{"href":"https://github.com/edreichua/CodeU-Summer-2018/pull/22"},"issue":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/22"},"comments":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/edreichua/CodeU-Summer-2018/statuses/6f62878a36c4775c98da74c34ac02f286bead8c2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"lukemujica"}}