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,