feat: gitlab triggers integration

This commit is contained in:
Krzysztof Dukszta-Kwiatkowski
2023-05-15 11:22:37 +02:00
committed by Ali BARIN
parent 93a2e2151e
commit 3f8f022d48
45 changed files with 2130 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
import { IRawTrigger } from '@automatisch/types';
import defineTrigger from '../../../../helpers/define-trigger';
import { GITLAB_EVENT_TYPE } from '../types';
import {
getRegisterHookFn,
getTestRunFn,
projectArgumentDescriptor,
unregisterHook,
} from '../lib';
import data from './pipeline_events';
export const triggerDescriptor: IRawTrigger = {
name: 'Pipeline events',
description:
'Pipeline events (triggered when the status of a pipeline changes)',
// info: 'https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#pipeline-events',
key: GITLAB_EVENT_TYPE.pipeline_events,
type: 'webhook',
arguments: [projectArgumentDescriptor],
testRun: getTestRunFn(data),
registerHook: getRegisterHookFn(GITLAB_EVENT_TYPE.pipeline_events),
unregisterHook,
};
export default defineTrigger(triggerDescriptor);