File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11import { Webhooks } from "../../index" ;
2- import { EmitterWebhookEvent } from "../../types" ;
32import { middleware } from "./middleware" ;
43import { onUnhandledRequestDefault } from "./on-unhandled-request-default" ;
54import { MiddlewareOptions } from "./types" ;
65
76export function createNodeMiddleware (
8- webhooks : Webhooks < EmitterWebhookEvent > ,
7+ webhooks : Webhooks ,
98 {
109 path = "/api/github/webhooks" ,
1110 onUnhandledRequest = onUnhandledRequestDefault ,
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import { IncomingMessage, ServerResponse } from "http";
33import { WebhookEventName } from "@octokit/webhooks-definitions/schema" ;
44
55import { Webhooks } from "../../index" ;
6- import { EmitterWebhookEvent , WebhookEventHandlerError } from "../../types" ;
6+ import { WebhookEventHandlerError } from "../../types" ;
77import { MiddlewareOptions } from "./types" ;
88import { onUnhandledRequestDefault } from "./on-unhandled-request-default" ;
99import { getMissingHeaders } from "./get-missing-headers" ;
1010import { getPayload } from "./get-payload" ;
1111
1212export function middleware (
13- webhooks : Webhooks < EmitterWebhookEvent > ,
13+ webhooks : Webhooks ,
1414 options : Required < MiddlewareOptions > ,
1515 request : IncomingMessage ,
1616 response : ServerResponse ,
@@ -76,9 +76,6 @@ export function middleware(
7676 . catch ( ( error : WebhookEventHandlerError ) => {
7777 clearTimeout ( timeout ) ;
7878
79- console . log ( `error` ) ;
80- console . log ( error ) ;
81-
8279 if ( didTimeout ) return ;
8380
8481 const statusCode = Array . from ( error ) [ 0 ] . status ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export function verify(
1919
2020 const signatureBuffer = Buffer . from ( signature ) ;
2121 const algorithm = getAlgorithm ( signature ) ;
22+
2223 const verificationBuffer = Buffer . from (
2324 sign ( { secret, algorithm } , eventPayload )
2425 ) ;
You can’t perform that action at this time.
0 commit comments