diff --git a/.changeset/thick-pets-drive.md b/.changeset/thick-pets-drive.md index a4d8a35029..ee09f8af06 100644 --- a/.changeset/thick-pets-drive.md +++ b/.changeset/thick-pets-drive.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-catalog-backend-module-gitlab': patch +'@backstage/plugin-catalog-backend-module-gitlab': minor --- Fix Gitlab.com user ingestion by scoping GitlabOrgDiscoveryEntityProvider to a group. diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index d49811b714..dee9f4ec51 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -117,13 +117,13 @@ export class GitLabClient { groupMembers(first: 100, relations: [DESCENDANTS], after: $endCursor) { nodes { user { - id - username + id + username publicEmail name state webUrl - avatarUrl + avatarUrl } } pageInfo { @@ -188,24 +188,24 @@ export class GitLabClient { body: JSON.stringify({ variables: { group: groupPath, endCursor }, query: `query listDescendantGroups($group: ID!, $endCursor: String) { - group(fullPath: $group) { - descendantGroups(first: 100, after: $endCursor){ - nodes{ - id - name - description - fullPath - parent{ - id - } - } - pageInfo { - endCursor - hasNextPage + group(fullPath: $group) { + descendantGroups(first: 100, after: $endCursor) { + nodes { + id + name + description + fullPath + parent { + id } + } + pageInfo { + endCursor + hasNextPage + } } - } - }`, + } + }`, }), }, ).then(r => r.json());