Skip to content

Commit 609a647

Browse files
committed
idemtpotency
1 parent 119ac04 commit 609a647

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

apps/sim/lib/webhooks/providers/azure-devops.ts

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,7 @@ export const azureDevOpsHandler: WebhookProviderHandler = {
4848
extractIdempotencyId(body: unknown): string | null {
4949
const obj = body as Record<string, unknown> | null
5050
if (!obj) return null
51-
const notificationId = obj.notificationId
52-
const subscriptionId = obj.subscriptionId
53-
if (
54-
(typeof notificationId === 'number' || typeof notificationId === 'string') &&
55-
typeof subscriptionId === 'string' &&
56-
subscriptionId
57-
) {
58-
return `azure_devops:${subscriptionId}:${notificationId}`
59-
}
60-
const eventType = obj.eventType
61-
const resource = obj.resource as Record<string, unknown> | undefined
62-
const resourceId = resource?.id
63-
if (
64-
typeof eventType === 'string' &&
65-
(typeof resourceId === 'number' || typeof resourceId === 'string')
66-
) {
67-
return `azure_devops:${eventType}:${resourceId}`
68-
}
69-
return null
51+
return `azure_devops:${obj.subscriptionId}:${obj.notificationId}`
7052
},
7153

7254
async formatInput({ body, webhook, requestId }: FormatInputContext): Promise<FormatInputResult> {

0 commit comments

Comments
 (0)