From 17b97abca63a42de901f8716eb96d5bc51303ba5 Mon Sep 17 00:00:00 2001 From: Lokesh Kaki Date: Sun, 15 Mar 2026 20:28:07 -0500 Subject: [PATCH] fix(catalog-backend-module-gitlab): move analyzer to alpha export, make logger optional, fix type cast Signed-off-by: Lokesh Kaki --- plugins/catalog-backend-module-gitlab/src/alpha.ts | 2 ++ .../src/events/analyzeGitLabWebhookEvent.ts | 4 ++-- plugins/catalog-backend-module-gitlab/src/index.ts | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-backend-module-gitlab/src/alpha.ts b/plugins/catalog-backend-module-gitlab/src/alpha.ts index 4c49bb9de9..0b29a09ba9 100644 --- a/plugins/catalog-backend-module-gitlab/src/alpha.ts +++ b/plugins/catalog-backend-module-gitlab/src/alpha.ts @@ -19,3 +19,5 @@ import { catalogModuleGitlabDiscoveryEntityProvider } from './module/catalogModu /** @alpha */ const _feature = catalogModuleGitlabDiscoveryEntityProvider; export default _feature; + +export { analyzeGitLabWebhookEvent } from './events/analyzeGitLabWebhookEvent'; diff --git a/plugins/catalog-backend-module-gitlab/src/events/analyzeGitLabWebhookEvent.ts b/plugins/catalog-backend-module-gitlab/src/events/analyzeGitLabWebhookEvent.ts index 4bea0230f0..6b2d44ddd6 100644 --- a/plugins/catalog-backend-module-gitlab/src/events/analyzeGitLabWebhookEvent.ts +++ b/plugins/catalog-backend-module-gitlab/src/events/analyzeGitLabWebhookEvent.ts @@ -22,7 +22,7 @@ import { WebhookPushEventSchema } from '@gitbeaker/rest'; type StringRecord = Record; export interface AnalyzeWebhookEventOptions { - logger: LoggerService; + logger?: LoggerService; isRelevantPath: (path: string) => boolean; } @@ -521,7 +521,7 @@ export async function analyzeGitLabWebhookEvent( } if (eventType === 'push') { - return onPushEvent(eventPayload as WebhookPushEventSchema, options); + return onPushEvent(eventPayload as unknown as WebhookPushEventSchema, options); } if (eventType === 'repository_update') { diff --git a/plugins/catalog-backend-module-gitlab/src/index.ts b/plugins/catalog-backend-module-gitlab/src/index.ts index 0ad28b8a4b..4f64e76395 100644 --- a/plugins/catalog-backend-module-gitlab/src/index.ts +++ b/plugins/catalog-backend-module-gitlab/src/index.ts @@ -26,7 +26,6 @@ export { GitlabDiscoveryEntityProvider, GitlabOrgDiscoveryEntityProvider, } from './providers'; -export { analyzeGitLabWebhookEvent } from './events/analyzeGitLabWebhookEvent'; export type { GitLabUser, GitLabGroup,