MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / fetchGitLabUser

Function fetchGitLabUser

apps/web/src/lib/integrations/platforms/gitlab/adapter.ts:466–483  ·  view source on GitHub ↗
(
  accessToken: string,
  instanceUrl: string = DEFAULT_GITLAB_URL
)

Source from the content-addressed store, hash-verified

464 }
465
466 const data = (await response.json()) as GitLabProject[];
467
468 projects.push(
469 ...data.filter(isActiveGitLabProject).map(project => ({
470 id: project.id,
471 name: project.name,
472 full_name: project.path_with_namespace,
473 private: project.visibility === 'private',
474 }))
475 );
476
477 const nextPage = Number.parseInt(response.headers.get('x-next-page') || '', 10);
478 if (Number.isInteger(nextPage) && nextPage > page) {
479 page = nextPage;
480 continue;
481 }
482
483 if (data.length < perPage) break;
484 page++;
485 }
486

Callers 1

Calls 4

buildGitLabUrlFunction · 0.90
fetchGitLabFunction · 0.85
textMethod · 0.65
jsonMethod · 0.65

Tested by

no test coverage detected