simplify client.hasFile to always use project.id in shouldProcessProject

Signed-off-by: Claire Peng <clairep@spotify.com>
This commit is contained in:
Claire Peng
2025-09-23 08:51:35 +01:00
parent bcac475df2
commit 226ef498e2
@@ -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;
}
}