fix(catalog-backend-module-gitlab): move analyzer to alpha export, make logger optional, fix type cast
Signed-off-by: Lokesh Kaki <lokeshkaki1@gmail.com>
This commit is contained in:
@@ -19,3 +19,5 @@ import { catalogModuleGitlabDiscoveryEntityProvider } from './module/catalogModu
|
||||
/** @alpha */
|
||||
const _feature = catalogModuleGitlabDiscoveryEntityProvider;
|
||||
export default _feature;
|
||||
|
||||
export { analyzeGitLabWebhookEvent } from './events/analyzeGitLabWebhookEvent';
|
||||
|
||||
@@ -22,7 +22,7 @@ import { WebhookPushEventSchema } from '@gitbeaker/rest';
|
||||
type StringRecord = Record<string, unknown>;
|
||||
|
||||
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') {
|
||||
|
||||
@@ -26,7 +26,6 @@ export {
|
||||
GitlabDiscoveryEntityProvider,
|
||||
GitlabOrgDiscoveryEntityProvider,
|
||||
} from './providers';
|
||||
export { analyzeGitLabWebhookEvent } from './events/analyzeGitLabWebhookEvent';
|
||||
export type {
|
||||
GitLabUser,
|
||||
GitLabGroup,
|
||||
|
||||
Reference in New Issue
Block a user