update shouldProcessProject to first check by namespacedPath (as previous), then check by id if failed
Signed-off-by: Claire Peng <clairep@spotify.com>
This commit is contained in:
+12
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user