{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/comments/219509306","pull_request_review_id":157705818,"id":219509306,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTUwOTMwNg==","diff_hunk":"@@ -68,42 +65,32 @@ func (c *TenantController) Setup(ctx *app.SetupTenantContext) error {\n \t}\n \n \t// fetch the cluster the user belongs to\n-\tuser, err := c.userService.GetUser(ctx, ttoken.Subject())\n+\tuser, err := c.authClientService.NewUser(ctx)\n \tif err != nil {","path":"controller/tenant.go","position":null,"original_position":66,"commit_id":"14c8dba35390dd43c5f6c41a48fea7eccb9aa6a8","original_commit_id":"1614299e7254a6b271b6ecfa1df605ce1b3fc818","user":{"login":"MatousJobanek","id":1510709,"node_id":"MDQ6VXNlcjE1MTA3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/1510709?v=4","gravatar_id":"","url":"https://api.github.com/users/MatousJobanek","html_url":"https://github.com/MatousJobanek","followers_url":"https://api.github.com/users/MatousJobanek/followers","following_url":"https://api.github.com/users/MatousJobanek/following{/other_user}","gists_url":"https://api.github.com/users/MatousJobanek/gists{/gist_id}","starred_url":"https://api.github.com/users/MatousJobanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatousJobanek/subscriptions","organizations_url":"https://api.github.com/users/MatousJobanek/orgs","repos_url":"https://api.github.com/users/MatousJobanek/repos","events_url":"https://api.github.com/users/MatousJobanek/events{/privacy}","received_events_url":"https://api.github.com/users/MatousJobanek/received_events","type":"User","site_admin":false},"body":"renamed in 2547d6c ","created_at":"2018-09-21T14:05:25Z","updated_at":"2018-09-21T14:05:25Z","html_url":"https://github.com/fabric8-services/fabric8-tenant/pull/632#discussion_r219509306","pull_request_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/comments/219509306"},"html":{"href":"https://github.com/fabric8-services/fabric8-tenant/pull/632#discussion_r219509306"},"pull_request":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632"}},"in_reply_to_id":219153142},"pull_request":{"url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632","id":214593055,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTkzMDU1","html_url":"https://github.com/fabric8-services/fabric8-tenant/pull/632","diff_url":"https://github.com/fabric8-services/fabric8-tenant/pull/632.diff","patch_url":"https://github.com/fabric8-services/fabric8-tenant/pull/632.patch","issue_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/632","number":632,"state":"open","locked":false,"title":"chore: refactoring of the components that comunicate with auth service","user":{"login":"MatousJobanek","id":1510709,"node_id":"MDQ6VXNlcjE1MTA3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/1510709?v=4","gravatar_id":"","url":"https://api.github.com/users/MatousJobanek","html_url":"https://github.com/MatousJobanek","followers_url":"https://api.github.com/users/MatousJobanek/followers","following_url":"https://api.github.com/users/MatousJobanek/following{/other_user}","gists_url":"https://api.github.com/users/MatousJobanek/gists{/gist_id}","starred_url":"https://api.github.com/users/MatousJobanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatousJobanek/subscriptions","organizations_url":"https://api.github.com/users/MatousJobanek/orgs","repos_url":"https://api.github.com/users/MatousJobanek/repos","events_url":"https://api.github.com/users/MatousJobanek/events{/privacy}","received_events_url":"https://api.github.com/users/MatousJobanek/received_events","type":"User","site_admin":false},"body":"This is the first step of a complete rewrite of the tenant service and is a preparation for OSIO on OSD support.\r\n\r\nThis PR contains a code that was separated (and slightly modified to fit here) from the whole rewrite that can be found here: https://github.com/MatousJobanek/fabric8-tenant/tree/v2 (FYI the code in the branch is still work-in-progress)\r\n\r\n#### Proposed changes \r\n* It \"only\" moves the code and integrates together those parts that are somehow related to auth service. \r\n  * Everything that is related to getting information about users and token management is moved to `auth` package and the main entry point for the communication (and auth client management) is [auth-service](https://github.com/fabric8-services/fabric8-tenant/compare/master...MatousJobanek:refactoring?expand=1#diff-ec041ec477251a53b62fb402b364d73bR19).\r\n  * Everything that is related to clusters is located in `cluster` package and the main entry point is\r\n[cluster-service](https://github.com/fabric8-services/fabric8-tenant/compare/master...MatousJobanek:refactoring?expand=1#diff-c0b4d0964c7a7f269081aa6229c3ed30R34).\r\n* Previously, there was used a combination of resolve functions that were integrated with each other and were internally used. Instead of it, I'm proposing a usage of service objects and passing the instances to the methods/functions.\r\n* As part of this refactoring I was trying to use the fabric8-common repository when possible.\r\n* Tests are technically almost the same as in the previous version, there was just slightly changed the setup of the tests.","created_at":"2018-09-11T10:58:00Z","updated_at":"2018-09-21T14:05:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e1c2c43fd9f87aa15de95da4e91461e93791bd4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632/commits","review_comments_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632/comments","review_comment_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/632/comments","statuses_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/statuses/14c8dba35390dd43c5f6c41a48fea7eccb9aa6a8","head":{"label":"MatousJobanek:refactoring","ref":"refactoring","sha":"14c8dba35390dd43c5f6c41a48fea7eccb9aa6a8","user":{"login":"MatousJobanek","id":1510709,"node_id":"MDQ6VXNlcjE1MTA3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/1510709?v=4","gravatar_id":"","url":"https://api.github.com/users/MatousJobanek","html_url":"https://github.com/MatousJobanek","followers_url":"https://api.github.com/users/MatousJobanek/followers","following_url":"https://api.github.com/users/MatousJobanek/following{/other_user}","gists_url":"https://api.github.com/users/MatousJobanek/gists{/gist_id}","starred_url":"https://api.github.com/users/MatousJobanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatousJobanek/subscriptions","organizations_url":"https://api.github.com/users/MatousJobanek/orgs","repos_url":"https://api.github.com/users/MatousJobanek/repos","events_url":"https://api.github.com/users/MatousJobanek/events{/privacy}","received_events_url":"https://api.github.com/users/MatousJobanek/received_events","type":"User","site_admin":false},"repo":{"id":141242074,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEyNDIwNzQ=","name":"fabric8-tenant","full_name":"MatousJobanek/fabric8-tenant","private":false,"owner":{"login":"MatousJobanek","id":1510709,"node_id":"MDQ6VXNlcjE1MTA3MDk=","avatar_url":"https://avatars3.githubusercontent.com/u/1510709?v=4","gravatar_id":"","url":"https://api.github.com/users/MatousJobanek","html_url":"https://github.com/MatousJobanek","followers_url":"https://api.github.com/users/MatousJobanek/followers","following_url":"https://api.github.com/users/MatousJobanek/following{/other_user}","gists_url":"https://api.github.com/users/MatousJobanek/gists{/gist_id}","starred_url":"https://api.github.com/users/MatousJobanek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatousJobanek/subscriptions","organizations_url":"https://api.github.com/users/MatousJobanek/orgs","repos_url":"https://api.github.com/users/MatousJobanek/repos","events_url":"https://api.github.com/users/MatousJobanek/events{/privacy}","received_events_url":"https://api.github.com/users/MatousJobanek/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MatousJobanek/fabric8-tenant","description":"Service responsible for provisioning and updating the tenant scoped services","fork":true,"url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant","forks_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/forks","keys_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/teams","hooks_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/hooks","issue_events_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/events","assignees_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/tags","blobs_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/languages","stargazers_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/stargazers","contributors_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/contributors","subscribers_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/subscribers","subscription_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/subscription","commits_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/merges","archive_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/downloads","issues_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/labels{/name}","releases_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/MatousJobanek/fabric8-tenant/deployments","created_at":"2018-07-17T06:29:54Z","updated_at":"2018-07-17T06:29:56Z","pushed_at":"2018-09-21T14:04:59Z","git_url":"git://github.com/MatousJobanek/fabric8-tenant.git","ssh_url":"git@github.com:MatousJobanek/fabric8-tenant.git","clone_url":"https://github.com/MatousJobanek/fabric8-tenant.git","svn_url":"https://github.com/MatousJobanek/fabric8-tenant","homepage":"","size":1004,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fabric8-services:master","ref":"master","sha":"8f03ff654af2a13adc25bb25a4f4d94b302fc544","user":{"login":"fabric8-services","id":29751612,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUxNjEy","avatar_url":"https://avatars1.githubusercontent.com/u/29751612?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-services","html_url":"https://github.com/fabric8-services","followers_url":"https://api.github.com/users/fabric8-services/followers","following_url":"https://api.github.com/users/fabric8-services/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-services/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-services/subscriptions","organizations_url":"https://api.github.com/users/fabric8-services/orgs","repos_url":"https://api.github.com/users/fabric8-services/repos","events_url":"https://api.github.com/users/fabric8-services/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-services/received_events","type":"Organization","site_admin":false},"repo":{"id":85101045,"node_id":"MDEwOlJlcG9zaXRvcnk4NTEwMTA0NQ==","name":"fabric8-tenant","full_name":"fabric8-services/fabric8-tenant","private":false,"owner":{"login":"fabric8-services","id":29751612,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUxNjEy","avatar_url":"https://avatars1.githubusercontent.com/u/29751612?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-services","html_url":"https://github.com/fabric8-services","followers_url":"https://api.github.com/users/fabric8-services/followers","following_url":"https://api.github.com/users/fabric8-services/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-services/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-services/subscriptions","organizations_url":"https://api.github.com/users/fabric8-services/orgs","repos_url":"https://api.github.com/users/fabric8-services/repos","events_url":"https://api.github.com/users/fabric8-services/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-services/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fabric8-services/fabric8-tenant","description":"Service responsible for provisioning and updating the tenant scoped services","fork":false,"url":"https://api.github.com/repos/fabric8-services/fabric8-tenant","forks_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/forks","keys_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/teams","hooks_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/hooks","issue_events_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/events","assignees_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/tags","blobs_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/languages","stargazers_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/stargazers","contributors_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/contributors","subscribers_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/subscribers","subscription_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/subscription","commits_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/merges","archive_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/downloads","issues_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/labels{/name}","releases_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8-services/fabric8-tenant/deployments","created_at":"2017-03-15T17:22:51Z","updated_at":"2018-09-20T10:11:40Z","pushed_at":"2018-09-21T14:05:01Z","git_url":"git://github.com/fabric8-services/fabric8-tenant.git","ssh_url":"git@github.com:fabric8-services/fabric8-tenant.git","clone_url":"https://github.com/fabric8-services/fabric8-tenant.git","svn_url":"https://github.com/fabric8-services/fabric8-tenant","homepage":"","size":683,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"archived":false,"open_issues_count":16,"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":24,"open_issues":16,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632"},"html":{"href":"https://github.com/fabric8-services/fabric8-tenant/pull/632"},"issue":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/632"},"comments":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/issues/632/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/pulls/632/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8-services/fabric8-tenant/statuses/14c8dba35390dd43c5f6c41a48fea7eccb9aa6a8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MatousJobanek"}}