MCPcopy Create free account
hub / github.com/simstudioai/sim / matchEvent

Function matchEvent

apps/sim/lib/webhooks/providers/azure-devops.ts:19–46  ·  view source on GitHub ↗
({
    body,
    requestId,
    providerConfig,
    webhook,
    workflow,
  }: EventMatchContext)

Source from the content-addressed store, hash-verified

17
18export 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

Callers

nothing calls this directly

Calls 2

isAzureDevOpsEventMatchFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected