Merge pull request #20893 from pushit-tech/fix-#20891-inherit_users_gitlabdiscovery

fix(catalog-backend-module-gitlab): #20891 GitlabOrgDiscoveryEntityProvider inherit members users
This commit is contained in:
Ben Lambert
2023-11-06 22:56:50 +01:00
committed by GitHub
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-gitlab': patch
---
Resolved a bug affecting the retrieval of users from group members. By appending '/all' to the API call, we now include members from all inherited groups, as per Gitlab's API specifications. This change is reflected in the listSaaSUsers function.
@@ -92,7 +92,7 @@ export class GitLabClient {
options?: CommonListOptions,
): Promise<PagedResponse<GitLabUser>> {
return this.pagedRequest(
`/groups/${encodeURIComponent(groupPath)}/members`,
`/groups/${encodeURIComponent(groupPath)}/members/all`,
{
...options,
show_seat_info: true,
@@ -569,7 +569,7 @@ describe('GitlabOrgDiscoveryEntityProvider', () => {
),
),
rest.get(
`https://gitlab.com/api/v4/groups/group1/members`,
`https://gitlab.com/api/v4/groups/group1/members/all`,
(_req, res, ctx) => {
const response = [
{