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:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user