{"action":"created","comment":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments/78554931","id":78554931,"diff_hunk":"@@ -5,24 +5,49 @@\n import org.springframework.transaction.annotation.Transactional;\n \n import eu.execom.labs.teamodoro.entity.Team;\n+import eu.execom.labs.teamodoro.entity.UserTeam;\n import eu.execom.labs.teamodoro.repository.TeamRepository;\n+import eu.execom.labs.teamodoro.repository.UserRepository;\n+import eu.execom.labs.teamodoro.repository.UserTeamRepository;\n+import lombok.NonNull;\n \n @Service\n public class TeamService {\n \n     @Autowired\n     private TeamRepository teamRepository;\n \n-    @Transactional\n-    public void save(Team team) {\n-        teamRepository.save(team);\n+    @Autowired\n+    private UserRepository userRepository;\n+\n+    @Autowired\n+    private UserTeamRepository userTeamRepository;\n+\n+    public Team findByName(String teamName) {\n+        return teamRepository.findByName(teamName);\n     }\n \n     @Transactional\n-    public void delete(Long teamId) {\n+    public void delete(@NonNull Long teamId) {\n         Team team = teamRepository.findOne(teamId);\n         team.setDeleted(true);\n-        teamRepository.save(team);\n+        team.setName(appendDeleted(team));","path":"src/main/java/eu/execom/labs/teamodoro/service/TeamService.java","position":35,"original_position":35,"commit_id":"8d19a4090015b5b656004139c20dfaa3f0933c1c","original_commit_id":"8d19a4090015b5b656004139c20dfaa3f0933c1c","user":{"login":"stanislavgrujic","id":2743162,"avatar_url":"https://avatars.githubusercontent.com/u/2743162?v=3","gravatar_id":"","url":"https://api.github.com/users/stanislavgrujic","html_url":"https://github.com/stanislavgrujic","followers_url":"https://api.github.com/users/stanislavgrujic/followers","following_url":"https://api.github.com/users/stanislavgrujic/following{/other_user}","gists_url":"https://api.github.com/users/stanislavgrujic/gists{/gist_id}","starred_url":"https://api.github.com/users/stanislavgrujic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanislavgrujic/subscriptions","organizations_url":"https://api.github.com/users/stanislavgrujic/orgs","repos_url":"https://api.github.com/users/stanislavgrujic/repos","events_url":"https://api.github.com/users/stanislavgrujic/events{/privacy}","received_events_url":"https://api.github.com/users/stanislavgrujic/received_events","type":"User","site_admin":false},"body":"Why do you rename it?","created_at":"2016-09-13T13:11:59Z","updated_at":"2016-09-13T13:11:59Z","html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23#discussion_r78554931","pull_request_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments/78554931"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23#discussion_r78554931"},"pull_request":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23","id":84835905,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23","diff_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23.diff","patch_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23.patch","issue_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/23","number":23,"state":"open","locked":false,"title":"[WIP] Added team service tests","user":{"login":"dufajlusi","id":19993915,"avatar_url":"https://avatars.githubusercontent.com/u/19993915?v=3","gravatar_id":"","url":"https://api.github.com/users/dufajlusi","html_url":"https://github.com/dufajlusi","followers_url":"https://api.github.com/users/dufajlusi/followers","following_url":"https://api.github.com/users/dufajlusi/following{/other_user}","gists_url":"https://api.github.com/users/dufajlusi/gists{/gist_id}","starred_url":"https://api.github.com/users/dufajlusi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dufajlusi/subscriptions","organizations_url":"https://api.github.com/users/dufajlusi/orgs","repos_url":"https://api.github.com/users/dufajlusi/repos","events_url":"https://api.github.com/users/dufajlusi/events{/privacy}","received_events_url":"https://api.github.com/users/dufajlusi/received_events","type":"User","site_admin":false},"body":"Implemented unit tests for team service. (Using mockito)","created_at":"2016-09-12T08:56:57Z","updated_at":"2016-09-13T13:11:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3936562bb8a9bfa3bb42243fb4ee07398636a7b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23/commits","review_comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23/comments","review_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/23/comments","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/8d19a4090015b5b656004139c20dfaa3f0933c1c","head":{"label":"execom-eu:master-dujfalusi-team-service-tests","ref":"master-dujfalusi-team-service-tests","sha":"8d19a4090015b5b656004139c20dfaa3f0933c1c","user":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"repo":{"id":65188077,"name":"execom-labs-team-pomodoro-jsp","full_name":"execom-eu/execom-labs-team-pomodoro-jsp","owner":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","description":"kontakt Stanislav Grujic","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/deployments","created_at":"2016-08-08T08:45:49Z","updated_at":"2016-09-07T12:41:03Z","pushed_at":"2016-09-13T12:49:44Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-jsp.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","homepage":null,"size":500,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"execom-eu:master","ref":"master","sha":"b5f5c2f2344515e665b56db0a8a70c8e3853718a","user":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"repo":{"id":65188077,"name":"execom-labs-team-pomodoro-jsp","full_name":"execom-eu/execom-labs-team-pomodoro-jsp","owner":{"login":"execom-eu","id":5187957,"avatar_url":"https://avatars.githubusercontent.com/u/5187957?v=3","gravatar_id":"","url":"https://api.github.com/users/execom-eu","html_url":"https://github.com/execom-eu","followers_url":"https://api.github.com/users/execom-eu/followers","following_url":"https://api.github.com/users/execom-eu/following{/other_user}","gists_url":"https://api.github.com/users/execom-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/execom-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/execom-eu/subscriptions","organizations_url":"https://api.github.com/users/execom-eu/orgs","repos_url":"https://api.github.com/users/execom-eu/repos","events_url":"https://api.github.com/users/execom-eu/events{/privacy}","received_events_url":"https://api.github.com/users/execom-eu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","description":"kontakt Stanislav Grujic","fork":false,"url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp","forks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/forks","keys_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/teams","hooks_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/hooks","issue_events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/events{/number}","events_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/events","assignees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/assignees{/user}","branches_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/branches{/branch}","tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/tags","blobs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/refs{/sha}","trees_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/{sha}","languages_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/languages","stargazers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/stargazers","contributors_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contributors","subscribers_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscribers","subscription_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/subscription","commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/commits{/sha}","git_commits_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/git/commits{/sha}","comments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/comments{/number}","issue_comment_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/comments{/number}","contents_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/contents/{+path}","compare_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/merges","archive_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/downloads","issues_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues{/number}","pulls_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls{/number}","milestones_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/milestones{/number}","notifications_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/labels{/name}","releases_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/releases{/id}","deployments_url":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/deployments","created_at":"2016-08-08T08:45:49Z","updated_at":"2016-09-07T12:41:03Z","pushed_at":"2016-09-13T12:49:44Z","git_url":"git://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","ssh_url":"git@github.com:execom-eu/execom-labs-team-pomodoro-jsp.git","clone_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp.git","svn_url":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp","homepage":null,"size":500,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23"},"html":{"href":"https://github.com/execom-eu/execom-labs-team-pomodoro-jsp/pull/23"},"issue":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/23"},"comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/execom-eu/execom-labs-team-pomodoro-jsp/statuses/8d19a4090015b5b656004139c20dfaa3f0933c1c"}}}}
{"actor":{"display_login":"stanislavgrujic"}}