File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 22// see https://github.com/octokit/octokit.js/issues/2075#issuecomment-817361886
33import type { IncomingMessage , ServerResponse } from "node:http" ;
44
5- import type { WebhookEventName } from "../../generated/webhook-identifiers.js" ;
6-
75import type { Webhooks } from "../../index.js" ;
86import type { WebhookEventHandlerError } from "../../types.js" ;
97import type { MiddlewareOptions } from "./types.js" ;
@@ -75,7 +73,7 @@ export async function middleware(
7573 return true ;
7674 }
7775
78- const eventName = request . headers [ "x-github-event" ] as WebhookEventName ;
76+ const eventName = request . headers [ "x-github-event" ] as string ;
7977 const signatureSHA256 = request . headers [ "x-hub-signature-256" ] as string ;
8078 const id = request . headers [ "x-github-delivery" ] as string ;
8179
@@ -95,7 +93,7 @@ export async function middleware(
9593
9694 await webhooks . verifyAndReceive ( {
9795 id : id ,
98- name : eventName as any ,
96+ name : eventName ,
9997 payload,
10098 signature : signatureSHA256 ,
10199 } ) ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export type EmitterWebhookEvent<
2525
2626export type EmitterWebhookEventWithStringPayloadAndSignature = {
2727 id : string ;
28- name : WebhookEventName ;
28+ name : string ;
2929 payload : string ;
3030 signature : string ;
3131} ;
You can’t perform that action at this time.
0 commit comments