GitHub PullRequestReviewCommentEvent at 2014-08-07 12:09:55
Repository: cloudbreak
Actor: doktoric
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/comments/15931473","id":15931473,"diff_hunk":"@@ -35,23 +41,39 @@\n     @Autowired\n     private StackService stackService;\n \n+    @Autowired\n+    private StackConverter stackConverter;\n+\n+    @Autowired\n+    private MetaDataConverter metaDataConverter;\n+\n     @RequestMapping(method = RequestMethod.POST)\n     @ResponseBody\n     public ResponseEntity<IdJson> createStack(@CurrentUser User user, @RequestBody @Valid StackJson stackRequest) {\n-        return new ResponseEntity<>(stackService.create(userRepository.findOneWithLists(user.getId()), stackRequest), HttpStatus.CREATED);\n+        User loadedUser = userRepository.findOneWithLists(user.getId());\n+        Stack stack = stackConverter.convert(stackRequest);\n+        if (stack.getUserRoles().isEmpty()) {\n+            stack.getUserRoles().addAll(loadedUser.getUserRoles());","path":"src/main/java/com/sequenceiq/cloudbreak/controller/StackController.java","position":37,"original_position":37,"commit_id":"3c2e603a8dd51570ce7a1b26379635fd85a12f4a","original_commit_id":"3c2e603a8dd51570ce7a1b26379635fd85a12f4a","user":{"login":"doktoric","id":1117088,"avatar_url":"https://avatars.githubusercontent.com/u/1117088?v=2","gravatar_id":"7f84084a03e442faf2d1bf584390d4de","url":"https://api.github.com/users/doktoric","html_url":"https://github.com/doktoric","followers_url":"https://api.github.com/users/doktoric/followers","following_url":"https://api.github.com/users/doktoric/following{/other_user}","gists_url":"https://api.github.com/users/doktoric/gists{/gist_id}","starred_url":"https://api.github.com/users/doktoric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doktoric/subscriptions","organizations_url":"https://api.github.com/users/doktoric/orgs","repos_url":"https://api.github.com/users/doktoric/repos","events_url":"https://api.github.com/users/doktoric/events{/privacy}","received_events_url":"https://api.github.com/users/doktoric/received_events","type":"User","site_admin":false},"body":"If the user is not an admin how will see the admin?","created_at":"2014-08-07T12:09:55Z","updated_at":"2014-08-07T12:09:55Z","html_url":"https://github.com/sequenceiq/cloudbreak/pull/246#discussion_r15931473","pull_request_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246","_links":{"self":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/comments/15931473"},"html":{"href":"https://github.com/sequenceiq/cloudbreak/pull/246#discussion_r15931473"},"pull_request":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246"}}},"pull_request":{"url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246","id":18962075,"html_url":"https://github.com/sequenceiq/cloudbreak/pull/246","diff_url":"https://github.com/sequenceiq/cloudbreak/pull/246.diff","patch_url":"https://github.com/sequenceiq/cloudbreak/pull/246.patch","issue_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/246","number":246,"state":"open","title":"Company","user":{"login":"lpuskas","id":3776655,"avatar_url":"https://avatars.githubusercontent.com/u/3776655?v=2","gravatar_id":"4cbbba39388363963a17d9189da76c2c","url":"https://api.github.com/users/lpuskas","html_url":"https://github.com/lpuskas","followers_url":"https://api.github.com/users/lpuskas/followers","following_url":"https://api.github.com/users/lpuskas/following{/other_user}","gists_url":"https://api.github.com/users/lpuskas/gists{/gist_id}","starred_url":"https://api.github.com/users/lpuskas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpuskas/subscriptions","organizations_url":"https://api.github.com/users/lpuskas/orgs","repos_url":"https://api.github.com/users/lpuskas/repos","events_url":"https://api.github.com/users/lpuskas/events{/privacy}","received_events_url":"https://api.github.com/users/lpuskas/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-07-28T11:39:45Z","updated_at":"2014-08-07T12:09:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abbc848674368ec2f7bef2a62c9f3d8c451958d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246/commits","review_comments_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246/comments","review_comment_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/246/comments","statuses_url":"https://api.github.com/repos/sequenceiq/cloudbreak/statuses/3c2e603a8dd51570ce7a1b26379635fd85a12f4a","head":{"label":"sequenceiq:company","ref":"company","sha":"3c2e603a8dd51570ce7a1b26379635fd85a12f4a","user":{"login":"sequenceiq","id":6003133,"avatar_url":"https://avatars.githubusercontent.com/u/6003133?v=2","gravatar_id":"de7a5be77348a89046d40e24080c50e5","url":"https://api.github.com/users/sequenceiq","html_url":"https://github.com/sequenceiq","followers_url":"https://api.github.com/users/sequenceiq/followers","following_url":"https://api.github.com/users/sequenceiq/following{/other_user}","gists_url":"https://api.github.com/users/sequenceiq/gists{/gist_id}","starred_url":"https://api.github.com/users/sequenceiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequenceiq/subscriptions","organizations_url":"https://api.github.com/users/sequenceiq/orgs","repos_url":"https://api.github.com/users/sequenceiq/repos","events_url":"https://api.github.com/users/sequenceiq/events{/privacy}","received_events_url":"https://api.github.com/users/sequenceiq/received_events","type":"Organization","site_admin":false},"repo":{"id":19638422,"name":"cloudbreak","full_name":"sequenceiq/cloudbreak","owner":{"login":"sequenceiq","id":6003133,"avatar_url":"https://avatars.githubusercontent.com/u/6003133?v=2","gravatar_id":"de7a5be77348a89046d40e24080c50e5","url":"https://api.github.com/users/sequenceiq","html_url":"https://github.com/sequenceiq","followers_url":"https://api.github.com/users/sequenceiq/followers","following_url":"https://api.github.com/users/sequenceiq/following{/other_user}","gists_url":"https://api.github.com/users/sequenceiq/gists{/gist_id}","starred_url":"https://api.github.com/users/sequenceiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequenceiq/subscriptions","organizations_url":"https://api.github.com/users/sequenceiq/orgs","repos_url":"https://api.github.com/users/sequenceiq/repos","events_url":"https://api.github.com/users/sequenceiq/events{/privacy}","received_events_url":"https://api.github.com/users/sequenceiq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sequenceiq/cloudbreak","description":"Cloudbreak is a cloud agnostic Hadoop as a Service API.","fork":false,"url":"https://api.github.com/repos/sequenceiq/cloudbreak","forks_url":"https://api.github.com/repos/sequenceiq/cloudbreak/forks","keys_url":"https://api.github.com/repos/sequenceiq/cloudbreak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sequenceiq/cloudbreak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sequenceiq/cloudbreak/teams","hooks_url":"https://api.github.com/repos/sequenceiq/cloudbreak/hooks","issue_events_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/events{/number}","events_url":"https://api.github.com/repos/sequenceiq/cloudbreak/events","assignees_url":"https://api.github.com/repos/sequenceiq/cloudbreak/assignees{/user}","branches_url":"https://api.github.com/repos/sequenceiq/cloudbreak/branches{/branch}","tags_url":"https://api.github.com/repos/sequenceiq/cloudbreak/tags","blobs_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/refs{/sha}","trees_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sequenceiq/cloudbreak/statuses/{sha}","languages_url":"https://api.github.com/repos/sequenceiq/cloudbreak/languages","stargazers_url":"https://api.github.com/repos/sequenceiq/cloudbreak/stargazers","contributors_url":"https://api.github.com/repos/sequenceiq/cloudbreak/contributors","subscribers_url":"https://api.github.com/repos/sequenceiq/cloudbreak/subscribers","subscription_url":"https://api.github.com/repos/sequenceiq/cloudbreak/subscription","commits_url":"https://api.github.com/repos/sequenceiq/cloudbreak/commits{/sha}","git_commits_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/commits{/sha}","comments_url":"https://api.github.com/repos/sequenceiq/cloudbreak/comments{/number}","issue_comment_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/comments/{number}","contents_url":"https://api.github.com/repos/sequenceiq/cloudbreak/contents/{+path}","compare_url":"https://api.github.com/repos/sequenceiq/cloudbreak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sequenceiq/cloudbreak/merges","archive_url":"https://api.github.com/repos/sequenceiq/cloudbreak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sequenceiq/cloudbreak/downloads","issues_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues{/number}","pulls_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls{/number}","milestones_url":"https://api.github.com/repos/sequenceiq/cloudbreak/milestones{/number}","notifications_url":"https://api.github.com/repos/sequenceiq/cloudbreak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sequenceiq/cloudbreak/labels{/name}","releases_url":"https://api.github.com/repos/sequenceiq/cloudbreak/releases{/id}","created_at":"2014-05-10T10:03:07Z","updated_at":"2014-08-05T03:21:29Z","pushed_at":"2014-08-07T10:29:29Z","git_url":"git://github.com/sequenceiq/cloudbreak.git","ssh_url":"git@github.com:sequenceiq/cloudbreak.git","clone_url":"https://github.com/sequenceiq/cloudbreak.git","svn_url":"https://github.com/sequenceiq/cloudbreak","homepage":"https://cloudbreak.sequenceiq.com/","size":10038,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":20,"default_branch":"master"}},"base":{"label":"sequenceiq:master","ref":"master","sha":"86265ee22f1428ee4801d503b54c3a6780a9a225","user":{"login":"sequenceiq","id":6003133,"avatar_url":"https://avatars.githubusercontent.com/u/6003133?v=2","gravatar_id":"de7a5be77348a89046d40e24080c50e5","url":"https://api.github.com/users/sequenceiq","html_url":"https://github.com/sequenceiq","followers_url":"https://api.github.com/users/sequenceiq/followers","following_url":"https://api.github.com/users/sequenceiq/following{/other_user}","gists_url":"https://api.github.com/users/sequenceiq/gists{/gist_id}","starred_url":"https://api.github.com/users/sequenceiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequenceiq/subscriptions","organizations_url":"https://api.github.com/users/sequenceiq/orgs","repos_url":"https://api.github.com/users/sequenceiq/repos","events_url":"https://api.github.com/users/sequenceiq/events{/privacy}","received_events_url":"https://api.github.com/users/sequenceiq/received_events","type":"Organization","site_admin":false},"repo":{"id":19638422,"name":"cloudbreak","full_name":"sequenceiq/cloudbreak","owner":{"login":"sequenceiq","id":6003133,"avatar_url":"https://avatars.githubusercontent.com/u/6003133?v=2","gravatar_id":"de7a5be77348a89046d40e24080c50e5","url":"https://api.github.com/users/sequenceiq","html_url":"https://github.com/sequenceiq","followers_url":"https://api.github.com/users/sequenceiq/followers","following_url":"https://api.github.com/users/sequenceiq/following{/other_user}","gists_url":"https://api.github.com/users/sequenceiq/gists{/gist_id}","starred_url":"https://api.github.com/users/sequenceiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequenceiq/subscriptions","organizations_url":"https://api.github.com/users/sequenceiq/orgs","repos_url":"https://api.github.com/users/sequenceiq/repos","events_url":"https://api.github.com/users/sequenceiq/events{/privacy}","received_events_url":"https://api.github.com/users/sequenceiq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sequenceiq/cloudbreak","description":"Cloudbreak is a cloud agnostic Hadoop as a Service API.","fork":false,"url":"https://api.github.com/repos/sequenceiq/cloudbreak","forks_url":"https://api.github.com/repos/sequenceiq/cloudbreak/forks","keys_url":"https://api.github.com/repos/sequenceiq/cloudbreak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sequenceiq/cloudbreak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sequenceiq/cloudbreak/teams","hooks_url":"https://api.github.com/repos/sequenceiq/cloudbreak/hooks","issue_events_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/events{/number}","events_url":"https://api.github.com/repos/sequenceiq/cloudbreak/events","assignees_url":"https://api.github.com/repos/sequenceiq/cloudbreak/assignees{/user}","branches_url":"https://api.github.com/repos/sequenceiq/cloudbreak/branches{/branch}","tags_url":"https://api.github.com/repos/sequenceiq/cloudbreak/tags","blobs_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/refs{/sha}","trees_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sequenceiq/cloudbreak/statuses/{sha}","languages_url":"https://api.github.com/repos/sequenceiq/cloudbreak/languages","stargazers_url":"https://api.github.com/repos/sequenceiq/cloudbreak/stargazers","contributors_url":"https://api.github.com/repos/sequenceiq/cloudbreak/contributors","subscribers_url":"https://api.github.com/repos/sequenceiq/cloudbreak/subscribers","subscription_url":"https://api.github.com/repos/sequenceiq/cloudbreak/subscription","commits_url":"https://api.github.com/repos/sequenceiq/cloudbreak/commits{/sha}","git_commits_url":"https://api.github.com/repos/sequenceiq/cloudbreak/git/commits{/sha}","comments_url":"https://api.github.com/repos/sequenceiq/cloudbreak/comments{/number}","issue_comment_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/comments/{number}","contents_url":"https://api.github.com/repos/sequenceiq/cloudbreak/contents/{+path}","compare_url":"https://api.github.com/repos/sequenceiq/cloudbreak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sequenceiq/cloudbreak/merges","archive_url":"https://api.github.com/repos/sequenceiq/cloudbreak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sequenceiq/cloudbreak/downloads","issues_url":"https://api.github.com/repos/sequenceiq/cloudbreak/issues{/number}","pulls_url":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls{/number}","milestones_url":"https://api.github.com/repos/sequenceiq/cloudbreak/milestones{/number}","notifications_url":"https://api.github.com/repos/sequenceiq/cloudbreak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sequenceiq/cloudbreak/labels{/name}","releases_url":"https://api.github.com/repos/sequenceiq/cloudbreak/releases{/id}","created_at":"2014-05-10T10:03:07Z","updated_at":"2014-08-05T03:21:29Z","pushed_at":"2014-08-07T10:29:29Z","git_url":"git://github.com/sequenceiq/cloudbreak.git","ssh_url":"git@github.com:sequenceiq/cloudbreak.git","clone_url":"https://github.com/sequenceiq/cloudbreak.git","svn_url":"https://github.com/sequenceiq/cloudbreak","homepage":"https://cloudbreak.sequenceiq.com/","size":10038,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246"},"html":{"href":"https://github.com/sequenceiq/cloudbreak/pull/246"},"issue":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/246"},"comments":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/issues/246/comments"},"review_comments":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246/comments"},"review_comment":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/pulls/246/commits"},"statuses":{"href":"https://api.github.com/repos/sequenceiq/cloudbreak/statuses/3c2e603a8dd51570ce7a1b26379635fd85a12f4a"}}}}