feat: Add gitlab group visibility to group entity via annotation part2

Signed-off-by: Markus <markus.siebert@deutschebahn.com>
This commit is contained in:
Markus
2024-02-13 12:43:47 +01:00
parent 9f5b8bcad6
commit edb1e853f6
3 changed files with 7 additions and 0 deletions
@@ -136,6 +136,7 @@ export class GitLabClient {
name
description
fullPath
visibility
parent {
id
}
@@ -170,6 +171,7 @@ export class GitLabClient {
name: groupItem.name,
description: groupItem.description,
full_path: groupItem.fullPath,
visibility: groupItem.visibility,
parent_id: Number(
groupItem.parent.id.replace(/^gid:\/\/gitlab\/Group\//, ''),
),
@@ -116,6 +116,7 @@ export type GitLabDescendantGroupsResponse = {
name: string;
description: string;
fullPath: string;
visibility: string;
parent: {
id: string;
};
@@ -526,6 +526,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
name: 'group2',
description: 'Group2',
fullPath: 'group1/group2',
visibility: 'private',
parent: {
id: 'gid://gitlab/Group/123',
},
@@ -535,6 +536,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
name: 'group3',
description: 'Group3',
fullPath: 'group1/group3',
visibility: 'public',
parent: {
id: 'gid://gitlab/Group/123',
},
@@ -704,6 +706,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
'backstage.io/managed-by-origin-location':
'url:https://gitlab.com/group1/group2',
'gitlab.com/team-path': 'group1/group2',
'gitlab.com/visibility': 'private',
},
description: 'Group2',
name: 'group2',
@@ -729,6 +732,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
'backstage.io/managed-by-origin-location':
'url:https://gitlab.com/group1/group3',
'gitlab.com/team-path': 'group1/group3',
'gitlab.com/visibility': 'public',
},
description: 'Group3',
name: 'group3',