From 37f540b71db528990ab0fab590e4e9b6a1f6dcbf Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Mon, 22 Sep 2025 10:37:52 +0100 Subject: [PATCH 01/13] update test handlers to simulate checking for both project.id and project.path_with_namespace Signed-off-by: Claire Peng --- .../src/__testUtils__/handlers.ts | 44 ++++++++++++------- .../src/lib/client.test.ts | 7 ++- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts index 9af00d2564..241bc86df6 100644 --- a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts +++ b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts @@ -266,24 +266,34 @@ const httpProjectFindByIdDynamic = all_projects_response.map(project => { return res(ctx.json(all_projects_response.find(p => p.id === project.id))); }); }); -const httpProjectCatalogDynamic = all_projects_response.map(project => { - const path: string = project.path_with_namespace - ? project.path_with_namespace!.replace(/\//g, '%2F') - : `${project.path_with_namespace}%2F${project.name}`; - return rest.head( - `${apiBaseUrl}/projects/${path}/repository/files/catalog-info.yaml`, - (req, res, ctx) => { - const branch = req.url.searchParams.get('ref'); - if ( - branch === project.default_branch || - branch === 'main' || - branch === 'develop' - ) { - return res(ctx.status(200)); - } - return res(ctx.status(404, 'Not Found')); - }, +/** + * Checks for both project id and namespaced path, as these can both be used for the :id segment in Gitlab API: + * https://docs.gitlab.com/api/repository_files/#get-file-from-repository + */ +const httpProjectCatalogDynamic = all_projects_response.flatMap(project => { + const possibleIdSegments: string[] = [ + project.id.toString(), + project.path_with_namespace ?? '', + ]; + + return possibleIdSegments.map(seg => + rest.head( + `${apiBaseUrl}/projects/${encodeURIComponent( + seg, + )}/repository/files/catalog-info.yaml`, + (req, res, ctx) => { + const branch = req.url.searchParams.get('ref'); + if ( + branch === project.default_branch || + branch === 'main' || + branch === 'develop' + ) { + return res(ctx.status(200)); + } + return res(ctx.status(404, 'Not Found')); + }, + ), ); }); diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts index 9b3bac6399..5a60d18493 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts @@ -580,7 +580,12 @@ describe('hasFile', () => { }); }); - it('should find catalog file', async () => { + it('should find catalog file by id', async () => { + const hasFile = await client.hasFile('1', 'main', 'catalog-info.yaml'); + expect(hasFile).toBe(true); + }); + + it('should find catalog file by namespace path', async () => { const hasFile = await client.hasFile( 'group1/test-repo1', 'main', From 047681317a79bd32d0a7b7be46acb5ee120f65ae Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Mon, 22 Sep 2025 10:49:28 +0100 Subject: [PATCH 02/13] update jsdoc for hasFile for the projectPath param Signed-off-by: Claire Peng --- plugins/catalog-backend-module-gitlab/src/lib/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index 3178e2c0d1..fcdf135199 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -342,8 +342,9 @@ export class GitLabClient { /** * General existence check. + * @see {@link https://docs.gitlab.com/api/repository_files/#get-file-from-repository | GitLab Repository Files API} * - * @param projectPath - The path to the project + * @param projectPath - The path to the project, either the numeric ID or the namespaced path. * @param branch - The branch used to search * @param filePath - The path to the file */ From 53aedd6a177f9db4622eb3a1ae285dd558bc3ab0 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Mon, 22 Sep 2025 11:09:29 +0100 Subject: [PATCH 03/13] rename projectPath param to project Signed-off-by: Claire Peng --- plugins/catalog-backend-module-gitlab/src/lib/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index fcdf135199..7860c66d1a 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -344,17 +344,17 @@ export class GitLabClient { * General existence check. * @see {@link https://docs.gitlab.com/api/repository_files/#get-file-from-repository | GitLab Repository Files API} * - * @param projectPath - The path to the project, either the numeric ID or the namespaced path. + * @param project - The path to the project, either the numeric ID or the namespaced path. * @param branch - The branch used to search * @param filePath - The path to the file */ async hasFile( - projectPath: string, + project: string, branch: string, filePath: string, ): Promise { const endpoint: string = `/projects/${encodeURIComponent( - projectPath, + project, )}/repository/files/${encodeURIComponent(filePath)}`; const request = new URL(`${this.config.apiBaseUrl}${endpoint}`); request.searchParams.append('ref', branch); From d84bf179485dd6ebf8d804171d2a48ab88943a1c Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Mon, 22 Sep 2025 12:49:07 +0100 Subject: [PATCH 04/13] update client.hasFile to prefer project.id, then namespacedPath, then empty string fallback Signed-off-by: Claire Peng --- plugins/catalog-backend-module-gitlab/src/lib/client.ts | 6 +++--- .../src/providers/GitlabDiscoveryEntityProvider.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index 7860c66d1a..46ff54846c 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -344,17 +344,17 @@ export class GitLabClient { * General existence check. * @see {@link https://docs.gitlab.com/api/repository_files/#get-file-from-repository | GitLab Repository Files API} * - * @param project - The path to the project, either the numeric ID or the namespaced path. + * @param projectIdentifier - The identifier of the project, either the numeric ID or the namespaced path. * @param branch - The branch used to search * @param filePath - The path to the file */ async hasFile( - project: string, + projectIdentifier: string, branch: string, filePath: string, ): Promise { const endpoint: string = `/projects/${encodeURIComponent( - project, + projectIdentifier, )}/repository/files/${encodeURIComponent(filePath)}`; const request = new URL(`${this.config.apiBaseUrl}${endpoint}`); request.searchParams.append('ref', branch); diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 11b6a0ce04..24bc5faccb 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -590,7 +590,7 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { this.config.fallbackBranch; const hasFile = await client.hasFile( - project.path_with_namespace ?? '', + project.id.toString() ?? project.path_with_namespace ?? '', project_branch, this.config.catalogFile, ); From bcac475df24d338433e3df8e86bcd58826d8995e Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Mon, 22 Sep 2025 13:42:16 +0100 Subject: [PATCH 05/13] update shouldProcessProject to first check by namespacedPath (as previous), then check by id if failed Signed-off-by: Claire Peng --- .../src/providers/GitlabDiscoveryEntityProvider.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 24bc5faccb..869374de07 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -589,12 +589,22 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { project.default_branch ?? this.config.fallbackBranch; - const hasFile = await client.hasFile( - project.id.toString() ?? project.path_with_namespace ?? '', + // Find file with namespaced path (most use-cases) + let hasFile = await client.hasFile( + project.path_with_namespace ?? '', project_branch, this.config.catalogFile, ); + // Find file with project id if namespace failed + if (!hasFile) { + hasFile = await client.hasFile( + project.id.toString(), + project_branch, + this.config.catalogFile, + ); + } + return hasFile; } } From 226ef498e224ceb58c2c90b98683c0607785d644 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Tue, 23 Sep 2025 08:51:35 +0100 Subject: [PATCH 06/13] simplify client.hasFile to always use project.id in shouldProcessProject Signed-off-by: Claire Peng --- .../src/providers/GitlabDiscoveryEntityProvider.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index 869374de07..e52c231d46 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -589,22 +589,12 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { project.default_branch ?? this.config.fallbackBranch; - // Find file with namespaced path (most use-cases) - let hasFile = await client.hasFile( - project.path_with_namespace ?? '', + const hasFile = await client.hasFile( + project.id.toString(), project_branch, this.config.catalogFile, ); - // Find file with project id if namespace failed - if (!hasFile) { - hasFile = await client.hasFile( - project.id.toString(), - project_branch, - this.config.catalogFile, - ); - } - return hasFile; } } From 0443119e7a3a1dd1b086d715a0bf0ff10aa29cf5 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Tue, 23 Sep 2025 09:16:57 +0100 Subject: [PATCH 07/13] add changeset Signed-off-by: Claire Peng --- .changeset/twelve-oranges-grin.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .changeset/twelve-oranges-grin.md diff --git a/.changeset/twelve-oranges-grin.md b/.changeset/twelve-oranges-grin.md new file mode 100644 index 0000000000..b508a59b0b --- /dev/null +++ b/.changeset/twelve-oranges-grin.md @@ -0,0 +1,20 @@ +--- +'@backstage/plugin-catalog-backend-module-gitlab': patch +--- + +Update GitlabDiscoveryEntityProvider to use `project.id` rather than `project.path_with_namespace` for `hasFile` check in `shouldProcessProject` + +Solves [#30147](https://github.com/backstage/backstage/issues/30147): + +> Use of project.id avoids edgecases caused by path encoding or project structure changes +> [...] +> It also simplifies reasoning about the GitLab API usage, since IDs are immutable, while paths are not. + +```diff +const hasFile = await client.hasFile( +- project.path_with_namespace, ++ project.id.toString(), + project_branch, + this.config.catalogFile, +); +``` From 61b6281e5c17445414d8a7d2ae258cf7779d2497 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Thu, 25 Sep 2025 10:12:40 +0100 Subject: [PATCH 08/13] simplify changeset & update hasFile to accept number or string Signed-off-by: Claire Peng --- .changeset/twelve-oranges-grin.md | 11 +---------- .../catalog-backend-module-gitlab/src/lib/client.ts | 2 +- .../src/providers/GitlabDiscoveryEntityProvider.ts | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.changeset/twelve-oranges-grin.md b/.changeset/twelve-oranges-grin.md index b508a59b0b..174dbdcd66 100644 --- a/.changeset/twelve-oranges-grin.md +++ b/.changeset/twelve-oranges-grin.md @@ -6,15 +6,6 @@ Update GitlabDiscoveryEntityProvider to use `project.id` rather than `project.pa Solves [#30147](https://github.com/backstage/backstage/issues/30147): -> Use of project.id avoids edgecases caused by path encoding or project structure changes +> Use of project.id avoids edge cases caused by path encoding or project structure changes > [...] > It also simplifies reasoning about the GitLab API usage, since IDs are immutable, while paths are not. - -```diff -const hasFile = await client.hasFile( -- project.path_with_namespace, -+ project.id.toString(), - project_branch, - this.config.catalogFile, -); -``` diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.ts index 46ff54846c..5c373dcf4a 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.ts @@ -349,7 +349,7 @@ export class GitLabClient { * @param filePath - The path to the file */ async hasFile( - projectIdentifier: string, + projectIdentifier: string | number, branch: string, filePath: string, ): Promise { diff --git a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts index e52c231d46..b3371dcc9e 100644 --- a/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts +++ b/plugins/catalog-backend-module-gitlab/src/providers/GitlabDiscoveryEntityProvider.ts @@ -590,7 +590,7 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider { this.config.fallbackBranch; const hasFile = await client.hasFile( - project.id.toString(), + project.id, project_branch, this.config.catalogFile, ); From 435a5cad5de5c4c2feb232998696ee635f1b4804 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Thu, 25 Sep 2025 10:46:05 +0100 Subject: [PATCH 09/13] update GitlabDiscoverProcessor to call client.hasFile using project.id Signed-off-by: Claire Peng --- .../src/GitLabDiscoveryProcessor.test.ts | 11 ++++++++--- .../src/GitLabDiscoveryProcessor.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts index 774da46553..06ad0b80db 100644 --- a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.test.ts @@ -33,6 +33,7 @@ const API_URL = `${SERVER_URL}/api/v4`; const PROJECTS_URL = `${API_URL}/projects`; const GROUP_PROJECTS_URL = `${API_URL}/groups/group%2Fsubgroup/projects`; const EXISTING_PROJECT_PATH = 'exist'; +const EXISTING_PROJECT_ID = 2; const PROJECT_LOCATION: LocationSpec = { type: 'gitlab-discovery', @@ -105,7 +106,7 @@ function setupFakeServer( ); }), rest.head( - `${API_URL}/projects/:project_path/repository/files/:file_path`, + `${API_URL}/projects/:projectIdentifier/repository/files/:file_path`, (req, res, ctx) => { if (req.headers.get('authorization') !== 'Bearer test-token') { return res( @@ -119,7 +120,11 @@ function setupFakeServer( return res(ctx.status(200)); } - if (EXISTING_PROJECT_PATH === req.params.project_path) { + if ( + // Gitlab GET project endpoint can use either numeric project.id or string project.path_with_namespace + EXISTING_PROJECT_ID.toString() === req.params.projectIdentifier || + EXISTING_PROJECT_PATH === req.params.projectIdentifier + ) { return res(ctx.status(200)); } @@ -385,7 +390,7 @@ describe('GitlabDiscoveryProcessor', () => { path_with_namespace: '1', }, { - id: 1, + id: EXISTING_PROJECT_ID, archived: false, default_branch: 'main', last_activity_at: '2021-08-05T11:03:05.774Z', diff --git a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts index 126bb07f03..5ae71dda06 100644 --- a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts +++ b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts @@ -139,7 +139,7 @@ export class GitLabDiscoveryProcessor implements CatalogProcessor { const project_branch = branch === '*' ? project.default_branch : branch; const projectHasFile: boolean = await client.hasFile( - project.path_with_namespace, + project.id, project_branch, catalogPath, ); From 5752fa92282dd2e43d7199bc53ef6b5037c99b80 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Thu, 25 Sep 2025 10:54:31 +0100 Subject: [PATCH 10/13] update client.test to call hasFile with numeric id Signed-off-by: Claire Peng --- plugins/catalog-backend-module-gitlab/src/lib/client.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts index 5a60d18493..35107c6e97 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts @@ -581,7 +581,7 @@ describe('hasFile', () => { }); it('should find catalog file by id', async () => { - const hasFile = await client.hasFile('1', 'main', 'catalog-info.yaml'); + const hasFile = await client.hasFile(1, 'main', 'catalog-info.yaml'); expect(hasFile).toBe(true); }); From 7be9bd7106593f3c2139a98a2a8128fd63c1dd03 Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Tue, 30 Sep 2025 14:08:01 +0200 Subject: [PATCH 11/13] simplify changeset Signed-off-by: Claire Peng --- .changeset/twelve-oranges-grin.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.changeset/twelve-oranges-grin.md b/.changeset/twelve-oranges-grin.md index 174dbdcd66..ab1ede0a0d 100644 --- a/.changeset/twelve-oranges-grin.md +++ b/.changeset/twelve-oranges-grin.md @@ -2,10 +2,4 @@ '@backstage/plugin-catalog-backend-module-gitlab': patch --- -Update GitlabDiscoveryEntityProvider to use `project.id` rather than `project.path_with_namespace` for `hasFile` check in `shouldProcessProject` - -Solves [#30147](https://github.com/backstage/backstage/issues/30147): - -> Use of project.id avoids edge cases caused by path encoding or project structure changes -> [...] -> It also simplifies reasoning about the GitLab API usage, since IDs are immutable, while paths are not. +Fixed an issue in `GitlabDiscoveryEntityProvider` where entity fetching could fail for projects with special characters or that had been renamed or moved. From d4a122978277fd1ba239eddb5bf42266c24c794e Mon Sep 17 00:00:00 2001 From: Claire Peng Date: Tue, 30 Sep 2025 14:17:51 +0200 Subject: [PATCH 12/13] update testhandler to only check for id Signed-off-by: Claire Peng --- .../src/__testUtils__/handlers.ts | 35 +++++++------------ .../src/lib/client.test.ts | 17 ++------- 2 files changed, 15 insertions(+), 37 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts index 241bc86df6..4f349a1978 100644 --- a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts +++ b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts @@ -272,28 +272,19 @@ const httpProjectFindByIdDynamic = all_projects_response.map(project => { * https://docs.gitlab.com/api/repository_files/#get-file-from-repository */ const httpProjectCatalogDynamic = all_projects_response.flatMap(project => { - const possibleIdSegments: string[] = [ - project.id.toString(), - project.path_with_namespace ?? '', - ]; - - return possibleIdSegments.map(seg => - rest.head( - `${apiBaseUrl}/projects/${encodeURIComponent( - seg, - )}/repository/files/catalog-info.yaml`, - (req, res, ctx) => { - const branch = req.url.searchParams.get('ref'); - if ( - branch === project.default_branch || - branch === 'main' || - branch === 'develop' - ) { - return res(ctx.status(200)); - } - return res(ctx.status(404, 'Not Found')); - }, - ), + return rest.head( + `${apiBaseUrl}/projects/${project.id.toString()}/repository/files/catalog-info.yaml`, + (req, res, ctx) => { + const branch = req.url.searchParams.get('ref'); + if ( + branch === project.default_branch || + branch === 'main' || + branch === 'develop' + ) { + return res(ctx.status(200)); + } + return res(ctx.status(404, 'Not Found')); + }, ); }); diff --git a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts index 35107c6e97..60974d2d0f 100644 --- a/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts +++ b/plugins/catalog-backend-module-gitlab/src/lib/client.test.ts @@ -580,26 +580,13 @@ describe('hasFile', () => { }); }); - it('should find catalog file by id', async () => { + it('should find catalog file', async () => { const hasFile = await client.hasFile(1, 'main', 'catalog-info.yaml'); expect(hasFile).toBe(true); }); - it('should find catalog file by namespace path', async () => { - const hasFile = await client.hasFile( - 'group1/test-repo1', - 'main', - 'catalog-info.yaml', - ); - expect(hasFile).toBe(true); - }); - it('should not find catalog file', async () => { - const hasFile = await client.hasFile( - 'group1/test-repo1', - 'unknown', - 'catalog-info.yaml', - ); + const hasFile = await client.hasFile(1, 'unknown', 'catalog-info.yaml'); expect(hasFile).toBe(false); }); }); From c10c5ee1102314f92654b78533c2bfb20ada3684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 1 Oct 2025 11:29:33 +0200 Subject: [PATCH 13/13] Update plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../src/__testUtils__/handlers.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts index 4f349a1978..2b28381ceb 100644 --- a/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts +++ b/plugins/catalog-backend-module-gitlab/src/__testUtils__/handlers.ts @@ -268,8 +268,7 @@ const httpProjectFindByIdDynamic = all_projects_response.map(project => { }); /** - * Checks for both project id and namespaced path, as these can both be used for the :id segment in Gitlab API: - * https://docs.gitlab.com/api/repository_files/#get-file-from-repository + * See https://docs.gitlab.com/api/repository_files/#get-file-from-repository */ const httpProjectCatalogDynamic = all_projects_response.flatMap(project => { return rest.head(