{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/comments/198839104","pull_request_review_id":132840214,"id":198839104,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODgzOTEwNA==","diff_hunk":"@@ -31,12 +31,20 @@ export class EditSpaceDescriptionWidgetComponent implements OnInit {\n     private userService: UserService,\n     private broadcaster: Broadcaster,\n     private spaceService: SpaceService,\n-    private spaceNamespaceService: SpaceNamespaceService\n+    private spaceNamespaceService: SpaceNamespaceService,\n+    private collaboratorService: CollaboratorService\n   ) {\n-    spaces.current.subscribe(val => {\n-      this.space = val;\n-      console.log('newspace', val);\n-    });\n+    spaces.current\n+      .subscribe(space => {\n+        this.space = space;","path":"src/app/dashboard-widgets/edit-space-description-widget/edit-space-description-widget.component.ts","position":36,"original_position":36,"commit_id":"02c0476e8897fcdfec7d632bcafb018fb83e8940","original_commit_id":"02c0476e8897fcdfec7d632bcafb018fb83e8940","user":{"login":"jiekang","id":5430520,"node_id":"MDQ6VXNlcjU0MzA1MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/5430520?v=4","gravatar_id":"","url":"https://api.github.com/users/jiekang","html_url":"https://github.com/jiekang","followers_url":"https://api.github.com/users/jiekang/followers","following_url":"https://api.github.com/users/jiekang/following{/other_user}","gists_url":"https://api.github.com/users/jiekang/gists{/gist_id}","starred_url":"https://api.github.com/users/jiekang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiekang/subscriptions","organizations_url":"https://api.github.com/users/jiekang/orgs","repos_url":"https://api.github.com/users/jiekang/repos","events_url":"https://api.github.com/users/jiekang/events{/privacy}","received_events_url":"https://api.github.com/users/jiekang/received_events","type":"User","site_admin":false},"body":"Are there any consequences for setting space even if the incoming space is null or undefined?","created_at":"2018-06-28T13:27:24Z","updated_at":"2018-06-28T13:44:27Z","html_url":"https://github.com/fabric8-ui/fabric8-ui/pull/3073#discussion_r198839104","pull_request_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/comments/198839104"},"html":{"href":"https://github.com/fabric8-ui/fabric8-ui/pull/3073#discussion_r198839104"},"pull_request":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073"}}},"pull_request":{"url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073","id":197145188,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MTQ1MTg4","html_url":"https://github.com/fabric8-ui/fabric8-ui/pull/3073","diff_url":"https://github.com/fabric8-ui/fabric8-ui/pull/3073.diff","patch_url":"https://github.com/fabric8-ui/fabric8-ui/pull/3073.patch","issue_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/3073","number":3073,"state":"open","locked":false,"title":"fix(space-description-widget): fix masthead to display real user info…","user":{"login":"aptmac","id":10425301,"node_id":"MDQ6VXNlcjEwNDI1MzAx","avatar_url":"https://avatars2.githubusercontent.com/u/10425301?v=4","gravatar_id":"","url":"https://api.github.com/users/aptmac","html_url":"https://github.com/aptmac","followers_url":"https://api.github.com/users/aptmac/followers","following_url":"https://api.github.com/users/aptmac/following{/other_user}","gists_url":"https://api.github.com/users/aptmac/gists{/gist_id}","starred_url":"https://api.github.com/users/aptmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptmac/subscriptions","organizations_url":"https://api.github.com/users/aptmac/orgs","repos_url":"https://api.github.com/users/aptmac/repos","events_url":"https://api.github.com/users/aptmac/events{/privacy}","received_events_url":"https://api.github.com/users/aptmac/received_events","type":"User","site_admin":false},"body":"…rmation instead of hardcoded values\r\n\r\nThis PR addresses the hardcoded values in the masthead of the edit-space-description-widget. The lack of real-values had been recorded as issue a couple few previously [0][1][2], but were closed due to the initial nature of the functionality. A PR [3] had initially been raised to remove hardcoded data, but didn't use real information so the PR was refused, noting that a future PR could be raised to implement these features. This PR retrieves the space's owner username and number of collaborators and updates the hardcoded values. Additionally, it changes the unactive `span` containing the \"add collaborators\" text to a `<a>` that links to the collaborators page so the user can add collaborators.\r\n\r\nThere were three changes required to make this happen:\r\n1. Update the username field using the space's `owned-by` value [4]\r\n2. Update the collaborator number field by displaying the length of the collaborators array using the collaborator service [5]\r\n3. Update the add collaborator link to route to the space's collaborator page [6]. @mindreeper2420 what are your thoughts on this? It seems like the collaborator functionality is going to be replaced with teams/orgs, is this be okay as a current solution and amended once teams/orgs are completed or I can remove these changes from the PR otherwise.\r\n\r\nAdditionally, the unit tests have been overhauled to better test the functionality of the component.\r\n\r\nBefore: here's what the masthead looks like in production:\r\n![before](https://user-images.githubusercontent.com/10425301/41856002-07ca79ea-7862-11e8-89f0-705060136f28.png)\r\n\r\nAfter: here's what the masthead looks like when viewing own space:\r\nEDIT (with white colour):\r\n![white-text](https://user-images.githubusercontent.com/10425301/41859694-b778675a-786a-11e8-8f0f-48cedf2ff00d.png)\r\n\r\nAfter: here's what the masthead looks like when viewing another user's space:\r\n![after-different-space](https://user-images.githubusercontent.com/10425301/41857336-420aaf0a-7865-11e8-860a-d1bdbb39a612.png)\r\n\r\n[0] https://github.com/openshiftio/openshift.io/issues/3261\r\n[1] https://github.com/openshiftio/openshift.io/issues/3262\r\n[2] https://github.com/openshiftio/openshift.io/issues/3263\r\n[3] https://github.com/fabric8-ui/fabric8-ui/pull/2926\r\n[4] https://github.com/aptmac/fabric8-ui/blob/42af2027719274573aaa7c13e57246e20b44e11d/src/app/dashboard-widgets/edit-space-description-widget/edit-space-description-widget.component.ts#L42\r\n[5] https://github.com/aptmac/fabric8-ui/blob/42af2027719274573aaa7c13e57246e20b44e11d/src/app/dashboard-widgets/edit-space-description-widget/edit-space-description-widget.component.ts#L41\r\n[6] https://github.com/aptmac/fabric8-ui/blob/42af2027719274573aaa7c13e57246e20b44e11d/src/app/dashboard-widgets/edit-space-description-widget/edit-space-description-widget.component.html#L9\r\n[7] https://github.com/openshiftio/openshift.io/issues/3760\r\n","created_at":"2018-06-25T15:09:29Z","updated_at":"2018-06-28T13:44:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3a3a6c2828628c719c63444a0da8d3590c086b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073/commits","review_comments_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073/comments","review_comment_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/3073/comments","statuses_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/statuses/02c0476e8897fcdfec7d632bcafb018fb83e8940","head":{"label":"aptmac:live-values-masthead","ref":"live-values-masthead","sha":"02c0476e8897fcdfec7d632bcafb018fb83e8940","user":{"login":"aptmac","id":10425301,"node_id":"MDQ6VXNlcjEwNDI1MzAx","avatar_url":"https://avatars2.githubusercontent.com/u/10425301?v=4","gravatar_id":"","url":"https://api.github.com/users/aptmac","html_url":"https://github.com/aptmac","followers_url":"https://api.github.com/users/aptmac/followers","following_url":"https://api.github.com/users/aptmac/following{/other_user}","gists_url":"https://api.github.com/users/aptmac/gists{/gist_id}","starred_url":"https://api.github.com/users/aptmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptmac/subscriptions","organizations_url":"https://api.github.com/users/aptmac/orgs","repos_url":"https://api.github.com/users/aptmac/repos","events_url":"https://api.github.com/users/aptmac/events{/privacy}","received_events_url":"https://api.github.com/users/aptmac/received_events","type":"User","site_admin":false},"repo":{"id":117593075,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc1OTMwNzU=","name":"fabric8-ui","full_name":"aptmac/fabric8-ui","owner":{"login":"aptmac","id":10425301,"node_id":"MDQ6VXNlcjEwNDI1MzAx","avatar_url":"https://avatars2.githubusercontent.com/u/10425301?v=4","gravatar_id":"","url":"https://api.github.com/users/aptmac","html_url":"https://github.com/aptmac","followers_url":"https://api.github.com/users/aptmac/followers","following_url":"https://api.github.com/users/aptmac/following{/other_user}","gists_url":"https://api.github.com/users/aptmac/gists{/gist_id}","starred_url":"https://api.github.com/users/aptmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptmac/subscriptions","organizations_url":"https://api.github.com/users/aptmac/orgs","repos_url":"https://api.github.com/users/aptmac/repos","events_url":"https://api.github.com/users/aptmac/events{/privacy}","received_events_url":"https://api.github.com/users/aptmac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aptmac/fabric8-ui","description":"The Angular frontend for fabric8 online (OpenShift.IO)","fork":true,"url":"https://api.github.com/repos/aptmac/fabric8-ui","forks_url":"https://api.github.com/repos/aptmac/fabric8-ui/forks","keys_url":"https://api.github.com/repos/aptmac/fabric8-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aptmac/fabric8-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aptmac/fabric8-ui/teams","hooks_url":"https://api.github.com/repos/aptmac/fabric8-ui/hooks","issue_events_url":"https://api.github.com/repos/aptmac/fabric8-ui/issues/events{/number}","events_url":"https://api.github.com/repos/aptmac/fabric8-ui/events","assignees_url":"https://api.github.com/repos/aptmac/fabric8-ui/assignees{/user}","branches_url":"https://api.github.com/repos/aptmac/fabric8-ui/branches{/branch}","tags_url":"https://api.github.com/repos/aptmac/fabric8-ui/tags","blobs_url":"https://api.github.com/repos/aptmac/fabric8-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aptmac/fabric8-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aptmac/fabric8-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/aptmac/fabric8-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aptmac/fabric8-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/aptmac/fabric8-ui/languages","stargazers_url":"https://api.github.com/repos/aptmac/fabric8-ui/stargazers","contributors_url":"https://api.github.com/repos/aptmac/fabric8-ui/contributors","subscribers_url":"https://api.github.com/repos/aptmac/fabric8-ui/subscribers","subscription_url":"https://api.github.com/repos/aptmac/fabric8-ui/subscription","commits_url":"https://api.github.com/repos/aptmac/fabric8-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/aptmac/fabric8-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/aptmac/fabric8-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/aptmac/fabric8-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/aptmac/fabric8-ui/contents/{+path}","compare_url":"https://api.github.com/repos/aptmac/fabric8-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aptmac/fabric8-ui/merges","archive_url":"https://api.github.com/repos/aptmac/fabric8-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aptmac/fabric8-ui/downloads","issues_url":"https://api.github.com/repos/aptmac/fabric8-ui/issues{/number}","pulls_url":"https://api.github.com/repos/aptmac/fabric8-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/aptmac/fabric8-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/aptmac/fabric8-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aptmac/fabric8-ui/labels{/name}","releases_url":"https://api.github.com/repos/aptmac/fabric8-ui/releases{/id}","deployments_url":"https://api.github.com/repos/aptmac/fabric8-ui/deployments","created_at":"2018-01-15T20:39:35Z","updated_at":"2018-06-28T13:03:19Z","pushed_at":"2018-06-28T13:12:48Z","git_url":"git://github.com/aptmac/fabric8-ui.git","ssh_url":"git@github.com:aptmac/fabric8-ui.git","clone_url":"https://github.com/aptmac/fabric8-ui.git","svn_url":"https://github.com/aptmac/fabric8-ui","homepage":"https://openshift.io/","size":14425,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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-ui:master","ref":"master","sha":"f10053812eea497fe2cbc51e6e03330a2c5a83c7","user":{"login":"fabric8-ui","id":25244298,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjQ0Mjk4","avatar_url":"https://avatars2.githubusercontent.com/u/25244298?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-ui","html_url":"https://github.com/fabric8-ui","followers_url":"https://api.github.com/users/fabric8-ui/followers","following_url":"https://api.github.com/users/fabric8-ui/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-ui/subscriptions","organizations_url":"https://api.github.com/users/fabric8-ui/orgs","repos_url":"https://api.github.com/users/fabric8-ui/repos","events_url":"https://api.github.com/users/fabric8-ui/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-ui/received_events","type":"Organization","site_admin":false},"repo":{"id":73824736,"node_id":"MDEwOlJlcG9zaXRvcnk3MzgyNDczNg==","name":"fabric8-ui","full_name":"fabric8-ui/fabric8-ui","owner":{"login":"fabric8-ui","id":25244298,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MjQ0Mjk4","avatar_url":"https://avatars2.githubusercontent.com/u/25244298?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-ui","html_url":"https://github.com/fabric8-ui","followers_url":"https://api.github.com/users/fabric8-ui/followers","following_url":"https://api.github.com/users/fabric8-ui/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-ui/subscriptions","organizations_url":"https://api.github.com/users/fabric8-ui/orgs","repos_url":"https://api.github.com/users/fabric8-ui/repos","events_url":"https://api.github.com/users/fabric8-ui/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-ui/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fabric8-ui/fabric8-ui","description":"The Angular frontend for fabric8 online (OpenShift.IO)","fork":false,"url":"https://api.github.com/repos/fabric8-ui/fabric8-ui","forks_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/forks","keys_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/teams","hooks_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/hooks","issue_events_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/events","assignees_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/tags","blobs_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/languages","stargazers_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/stargazers","contributors_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/contributors","subscribers_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/subscribers","subscription_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/subscription","commits_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/merges","archive_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/downloads","issues_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/labels{/name}","releases_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8-ui/fabric8-ui/deployments","created_at":"2016-11-15T15:04:11Z","updated_at":"2018-06-28T13:23:52Z","pushed_at":"2018-06-28T13:23:48Z","git_url":"git://github.com/fabric8-ui/fabric8-ui.git","ssh_url":"git@github.com:fabric8-ui/fabric8-ui.git","clone_url":"https://github.com/fabric8-ui/fabric8-ui.git","svn_url":"https://github.com/fabric8-ui/fabric8-ui","homepage":"https://openshift.io/","size":14417,"stargazers_count":23,"watchers_count":23,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":84,"mirror_url":null,"archived":false,"open_issues_count":17,"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":84,"open_issues":17,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073"},"html":{"href":"https://github.com/fabric8-ui/fabric8-ui/pull/3073"},"issue":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/3073"},"comments":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/issues/3073/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/pulls/3073/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8-ui/fabric8-ui/statuses/02c0476e8897fcdfec7d632bcafb018fb83e8940"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jiekang"}}