Apply suggestions from code review

Co-authored-by: Jamie Klassen <jklassen@vmware.com>
Signed-off-by: sbarrypoppulo <101636916+sbarrypoppulo@users.noreply.github.com>
This commit is contained in:
sbarrypoppulo
2023-08-22 08:26:01 +01:00
committed by GitHub
parent 1825c689d0
commit 8bc51413d9
3 changed files with 20 additions and 18 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ e.g. If `group` is `org/teams`, the name for `org/teams/avengers/gotg` will be
For gitlab.com, when `orgEnabled: true`, the `group` parameter is required in
order to limit the ingestion to a group within your organisation. `Group`
entities will only be ingested for the configured group, or it's descendant groups,
entities will only be ingested for the configured group, or its descendant groups,
but not any ancestor groups higher than the configured group path. Only groups
which contain members will be ingested.
@@ -115,25 +115,27 @@ 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 {
query: /* GraphQL */ `
query listDescendantGroups($group: ID!, $endCursor: String) {
group(fullPath: $group) {
descendantGroups(first: 100, after: $endCursor) {
nodes {
id
name
description
fullPath
parent {
id
}
}
pageInfo {
endCursor
hasNextPage
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
}`,
`,
}),
},
).then(r => r.json());
@@ -189,7 +191,7 @@ export class GitLabClient {
},
body: JSON.stringify({
variables: { group: groupPath, relations: relations, endCursor },
query: `query getGroupMembers($group: ID!, $relations: [GroupMemberRelation!], $endCursor: String) {
query: /* GraphQL */ `query getGroupMembers($group: ID!, $relations: [GroupMemberRelation!], $endCursor: String) {
group(fullPath: $group) {
groupMembers(first: 100, relations: $relations, after: $endCursor) {
nodes {
@@ -80,7 +80,7 @@ export type GitLabGroupMembersResponse = {
};
};
export type GitLabSaasGroupsResponse = {
export type GitLabDescendantGroupsResponse = {
errors: { message: string }[];
data: {
group: {