{"action":"created","comment":{"url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/comments/100042723","pull_request_review_id":20734742,"id":100042723,"diff_hunk":"@@ -7,17 +7,38 @@\n import org.springframework.stereotype.Service;\n \n import javax.inject.Inject;\n+import java.text.SimpleDateFormat;\n+import java.util.Date;\n+import java.util.List;\n \n @Service\n public class AchievementService {\n \n     @Inject\n     private AchievementRepository achievementRepository;\n \n-    public String addDaily(String report, String userFromId) {\n-        //TODO To check if the daily is given today\n-\n-        Achievement achievement = new Achievement(userFromId, null, 1, report, AchievementType.DAILY);\n-        return achievementRepository.addAchievement(achievement);\n+    public String addDaily(String description, String userFromId) {\n+        String userToId = userFromId;\n+        String currentDate = getFormattedCurrentDate();\n+        List<Achievement> userFromIdList = achievementRepository.getAllAchievementsByUserToId(userToId);\n+        for (Achievement achievement : userFromIdList) {","path":"src/main/java/juja/microservices/gamification/service/AchievementService.java","position":23,"original_position":23,"commit_id":"9ec9653bf760583b6ec141967108d550f90d8cd3","original_commit_id":"9ec9653bf760583b6ec141967108d550f90d8cd3","user":{"login":"OlgaKulikova","id":8887479,"avatar_url":"https://avatars.githubusercontent.com/u/8887479?v=3","gravatar_id":"","url":"https://api.github.com/users/OlgaKulikova","html_url":"https://github.com/OlgaKulikova","followers_url":"https://api.github.com/users/OlgaKulikova/followers","following_url":"https://api.github.com/users/OlgaKulikova/following{/other_user}","gists_url":"https://api.github.com/users/OlgaKulikova/gists{/gist_id}","starred_url":"https://api.github.com/users/OlgaKulikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlgaKulikova/subscriptions","organizations_url":"https://api.github.com/users/OlgaKulikova/orgs","repos_url":"https://api.github.com/users/OlgaKulikova/repos","events_url":"https://api.github.com/users/OlgaKulikova/events{/privacy}","received_events_url":"https://api.github.com/users/OlgaKulikova/received_events","type":"User","site_admin":false},"body":"такие эксепшены обсудим при встрече. Неоднозначно.","created_at":"2017-02-08T11:16:45Z","updated_at":"2017-02-08T11:16:45Z","html_url":"https://github.com/JuniorsJava/gamification/pull/32#discussion_r100042723","pull_request_url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/comments/100042723"},"html":{"href":"https://github.com/JuniorsJava/gamification/pull/32#discussion_r100042723"},"pull_request":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32","id":105013113,"html_url":"https://github.com/JuniorsJava/gamification/pull/32","diff_url":"https://github.com/JuniorsJava/gamification/pull/32.diff","patch_url":"https://github.com/JuniorsJava/gamification/pull/32.patch","issue_url":"https://api.github.com/repos/JuniorsJava/gamification/issues/32","number":32,"state":"open","locked":false,"title":"Issue#20","user":{"login":"BaHo1984","id":14925517,"avatar_url":"https://avatars.githubusercontent.com/u/14925517?v=3","gravatar_id":"","url":"https://api.github.com/users/BaHo1984","html_url":"https://github.com/BaHo1984","followers_url":"https://api.github.com/users/BaHo1984/followers","following_url":"https://api.github.com/users/BaHo1984/following{/other_user}","gists_url":"https://api.github.com/users/BaHo1984/gists{/gist_id}","starred_url":"https://api.github.com/users/BaHo1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaHo1984/subscriptions","organizations_url":"https://api.github.com/users/BaHo1984/orgs","repos_url":"https://api.github.com/users/BaHo1984/repos","events_url":"https://api.github.com/users/BaHo1984/events{/privacy}","received_events_url":"https://api.github.com/users/BaHo1984/received_events","type":"User","site_admin":false},"body":"Добавил метод добавления дейлика и пару тестов (тесты мне не очень нравяться и не совсем понятно когда добавляется дата в Ачивмент)","created_at":"2017-02-07T14:12:54Z","updated_at":"2017-02-08T11:16:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0f16feff7b0bf176d6f1bfe0b94d77ef0f524eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32/commits","review_comments_url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32/comments","review_comment_url":"https://api.github.com/repos/JuniorsJava/gamification/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuniorsJava/gamification/issues/32/comments","statuses_url":"https://api.github.com/repos/JuniorsJava/gamification/statuses/9ec9653bf760583b6ec141967108d550f90d8cd3","head":{"label":"BaHo1984:issue#20","ref":"issue#20","sha":"9ec9653bf760583b6ec141967108d550f90d8cd3","user":{"login":"BaHo1984","id":14925517,"avatar_url":"https://avatars.githubusercontent.com/u/14925517?v=3","gravatar_id":"","url":"https://api.github.com/users/BaHo1984","html_url":"https://github.com/BaHo1984","followers_url":"https://api.github.com/users/BaHo1984/followers","following_url":"https://api.github.com/users/BaHo1984/following{/other_user}","gists_url":"https://api.github.com/users/BaHo1984/gists{/gist_id}","starred_url":"https://api.github.com/users/BaHo1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaHo1984/subscriptions","organizations_url":"https://api.github.com/users/BaHo1984/orgs","repos_url":"https://api.github.com/users/BaHo1984/repos","events_url":"https://api.github.com/users/BaHo1984/events{/privacy}","received_events_url":"https://api.github.com/users/BaHo1984/received_events","type":"User","site_admin":false},"repo":{"id":75068983,"name":"gamification","full_name":"BaHo1984/gamification","owner":{"login":"BaHo1984","id":14925517,"avatar_url":"https://avatars.githubusercontent.com/u/14925517?v=3","gravatar_id":"","url":"https://api.github.com/users/BaHo1984","html_url":"https://github.com/BaHo1984","followers_url":"https://api.github.com/users/BaHo1984/followers","following_url":"https://api.github.com/users/BaHo1984/following{/other_user}","gists_url":"https://api.github.com/users/BaHo1984/gists{/gist_id}","starred_url":"https://api.github.com/users/BaHo1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaHo1984/subscriptions","organizations_url":"https://api.github.com/users/BaHo1984/orgs","repos_url":"https://api.github.com/users/BaHo1984/repos","events_url":"https://api.github.com/users/BaHo1984/events{/privacy}","received_events_url":"https://api.github.com/users/BaHo1984/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BaHo1984/gamification","description":null,"fork":true,"url":"https://api.github.com/repos/BaHo1984/gamification","forks_url":"https://api.github.com/repos/BaHo1984/gamification/forks","keys_url":"https://api.github.com/repos/BaHo1984/gamification/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BaHo1984/gamification/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BaHo1984/gamification/teams","hooks_url":"https://api.github.com/repos/BaHo1984/gamification/hooks","issue_events_url":"https://api.github.com/repos/BaHo1984/gamification/issues/events{/number}","events_url":"https://api.github.com/repos/BaHo1984/gamification/events","assignees_url":"https://api.github.com/repos/BaHo1984/gamification/assignees{/user}","branches_url":"https://api.github.com/repos/BaHo1984/gamification/branches{/branch}","tags_url":"https://api.github.com/repos/BaHo1984/gamification/tags","blobs_url":"https://api.github.com/repos/BaHo1984/gamification/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BaHo1984/gamification/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BaHo1984/gamification/git/refs{/sha}","trees_url":"https://api.github.com/repos/BaHo1984/gamification/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BaHo1984/gamification/statuses/{sha}","languages_url":"https://api.github.com/repos/BaHo1984/gamification/languages","stargazers_url":"https://api.github.com/repos/BaHo1984/gamification/stargazers","contributors_url":"https://api.github.com/repos/BaHo1984/gamification/contributors","subscribers_url":"https://api.github.com/repos/BaHo1984/gamification/subscribers","subscription_url":"https://api.github.com/repos/BaHo1984/gamification/subscription","commits_url":"https://api.github.com/repos/BaHo1984/gamification/commits{/sha}","git_commits_url":"https://api.github.com/repos/BaHo1984/gamification/git/commits{/sha}","comments_url":"https://api.github.com/repos/BaHo1984/gamification/comments{/number}","issue_comment_url":"https://api.github.com/repos/BaHo1984/gamification/issues/comments{/number}","contents_url":"https://api.github.com/repos/BaHo1984/gamification/contents/{+path}","compare_url":"https://api.github.com/repos/BaHo1984/gamification/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BaHo1984/gamification/merges","archive_url":"https://api.github.com/repos/BaHo1984/gamification/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BaHo1984/gamification/downloads","issues_url":"https://api.github.com/repos/BaHo1984/gamification/issues{/number}","pulls_url":"https://api.github.com/repos/BaHo1984/gamification/pulls{/number}","milestones_url":"https://api.github.com/repos/BaHo1984/gamification/milestones{/number}","notifications_url":"https://api.github.com/repos/BaHo1984/gamification/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BaHo1984/gamification/labels{/name}","releases_url":"https://api.github.com/repos/BaHo1984/gamification/releases{/id}","deployments_url":"https://api.github.com/repos/BaHo1984/gamification/deployments","created_at":"2016-11-29T10:12:17Z","updated_at":"2016-11-29T10:12:18Z","pushed_at":"2017-02-07T14:09:32Z","git_url":"git://github.com/BaHo1984/gamification.git","ssh_url":"git@github.com:BaHo1984/gamification.git","clone_url":"https://github.com/BaHo1984/gamification.git","svn_url":"https://github.com/BaHo1984/gamification","homepage":null,"size":147,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuniorsJava:achievement","ref":"achievement","sha":"e7f1fb3a8c8d3ec22720309ae05e209063b0c8bb","user":{"login":"JuniorsJava","id":9441534,"avatar_url":"https://avatars.githubusercontent.com/u/9441534?v=3","gravatar_id":"","url":"https://api.github.com/users/JuniorsJava","html_url":"https://github.com/JuniorsJava","followers_url":"https://api.github.com/users/JuniorsJava/followers","following_url":"https://api.github.com/users/JuniorsJava/following{/other_user}","gists_url":"https://api.github.com/users/JuniorsJava/gists{/gist_id}","starred_url":"https://api.github.com/users/JuniorsJava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuniorsJava/subscriptions","organizations_url":"https://api.github.com/users/JuniorsJava/orgs","repos_url":"https://api.github.com/users/JuniorsJava/repos","events_url":"https://api.github.com/users/JuniorsJava/events{/privacy}","received_events_url":"https://api.github.com/users/JuniorsJava/received_events","type":"Organization","site_admin":false},"repo":{"id":74899685,"name":"gamification","full_name":"JuniorsJava/gamification","owner":{"login":"JuniorsJava","id":9441534,"avatar_url":"https://avatars.githubusercontent.com/u/9441534?v=3","gravatar_id":"","url":"https://api.github.com/users/JuniorsJava","html_url":"https://github.com/JuniorsJava","followers_url":"https://api.github.com/users/JuniorsJava/followers","following_url":"https://api.github.com/users/JuniorsJava/following{/other_user}","gists_url":"https://api.github.com/users/JuniorsJava/gists{/gist_id}","starred_url":"https://api.github.com/users/JuniorsJava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuniorsJava/subscriptions","organizations_url":"https://api.github.com/users/JuniorsJava/orgs","repos_url":"https://api.github.com/users/JuniorsJava/repos","events_url":"https://api.github.com/users/JuniorsJava/events{/privacy}","received_events_url":"https://api.github.com/users/JuniorsJava/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuniorsJava/gamification","description":null,"fork":false,"url":"https://api.github.com/repos/JuniorsJava/gamification","forks_url":"https://api.github.com/repos/JuniorsJava/gamification/forks","keys_url":"https://api.github.com/repos/JuniorsJava/gamification/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuniorsJava/gamification/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuniorsJava/gamification/teams","hooks_url":"https://api.github.com/repos/JuniorsJava/gamification/hooks","issue_events_url":"https://api.github.com/repos/JuniorsJava/gamification/issues/events{/number}","events_url":"https://api.github.com/repos/JuniorsJava/gamification/events","assignees_url":"https://api.github.com/repos/JuniorsJava/gamification/assignees{/user}","branches_url":"https://api.github.com/repos/JuniorsJava/gamification/branches{/branch}","tags_url":"https://api.github.com/repos/JuniorsJava/gamification/tags","blobs_url":"https://api.github.com/repos/JuniorsJava/gamification/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuniorsJava/gamification/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuniorsJava/gamification/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuniorsJava/gamification/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuniorsJava/gamification/statuses/{sha}","languages_url":"https://api.github.com/repos/JuniorsJava/gamification/languages","stargazers_url":"https://api.github.com/repos/JuniorsJava/gamification/stargazers","contributors_url":"https://api.github.com/repos/JuniorsJava/gamification/contributors","subscribers_url":"https://api.github.com/repos/JuniorsJava/gamification/subscribers","subscription_url":"https://api.github.com/repos/JuniorsJava/gamification/subscription","commits_url":"https://api.github.com/repos/JuniorsJava/gamification/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuniorsJava/gamification/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuniorsJava/gamification/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuniorsJava/gamification/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuniorsJava/gamification/contents/{+path}","compare_url":"https://api.github.com/repos/JuniorsJava/gamification/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuniorsJava/gamification/merges","archive_url":"https://api.github.com/repos/JuniorsJava/gamification/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuniorsJava/gamification/downloads","issues_url":"https://api.github.com/repos/JuniorsJava/gamification/issues{/number}","pulls_url":"https://api.github.com/repos/JuniorsJava/gamification/pulls{/number}","milestones_url":"https://api.github.com/repos/JuniorsJava/gamification/milestones{/number}","notifications_url":"https://api.github.com/repos/JuniorsJava/gamification/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuniorsJava/gamification/labels{/name}","releases_url":"https://api.github.com/repos/JuniorsJava/gamification/releases{/id}","deployments_url":"https://api.github.com/repos/JuniorsJava/gamification/deployments","created_at":"2016-11-27T16:27:20Z","updated_at":"2016-12-01T13:49:47Z","pushed_at":"2017-02-07T14:12:55Z","git_url":"git://github.com/JuniorsJava/gamification.git","ssh_url":"git@github.com:JuniorsJava/gamification.git","clone_url":"https://github.com/JuniorsJava/gamification.git","svn_url":"https://github.com/JuniorsJava/gamification","homepage":null,"size":152,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32"},"html":{"href":"https://github.com/JuniorsJava/gamification/pull/32"},"issue":{"href":"https://api.github.com/repos/JuniorsJava/gamification/issues/32"},"comments":{"href":"https://api.github.com/repos/JuniorsJava/gamification/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuniorsJava/gamification/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/JuniorsJava/gamification/statuses/9ec9653bf760583b6ec141967108d550f90d8cd3"}}}}
{"actor":{"display_login":"OlgaKulikova"}}