({
body,
requestId,
providerConfig,
webhook,
workflow,
}: EventMatchContext)
| 17 | |
| 18 | export const azureDevOpsHandler: WebhookProviderHandler = { |
| 19 | async matchEvent({ |
| 20 | body, |
| 21 | requestId, |
| 22 | providerConfig, |
| 23 | webhook, |
| 24 | workflow, |
| 25 | }: EventMatchContext): Promise<boolean> { |
| 26 | const triggerId = providerConfig.triggerId as string | undefined |
| 27 | const b = body as Record<string, unknown> |
| 28 | |
| 29 | if (triggerId && triggerId !== 'azure_devops_webhook') { |
| 30 | const { isAzureDevOpsEventMatch } = await import('@/triggers/azure_devops/utils') |
| 31 | if (!isAzureDevOpsEventMatch(triggerId, b)) { |
| 32 | logger.debug( |
| 33 | `[${requestId}] Azure DevOps event mismatch for trigger ${triggerId}. Skipping execution.`, |
| 34 | { |
| 35 | webhookId: webhook.id, |
| 36 | workflowId: workflow.id, |
| 37 | triggerId, |
| 38 | eventType: b.eventType, |
| 39 | } |
| 40 | ) |
| 41 | return false |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return true |
| 46 | }, |
| 47 | |
| 48 | extractIdempotencyId(body: unknown): string | null { |
| 49 | const obj = body as Record<string, unknown> | null |
nothing calls this directly
no test coverage detected