@@ -27,6 +27,12 @@ import { createAppAuth } from "@octokit/auth-app";
2727import { OAuthApp } from "@octokit/oauth-app" ;
2828import { Webhooks , type EmitterWebhookEvent } from "@octokit/webhooks" ;
2929
30+ import type { Octokit } from "@octokit/core" ;
31+ import { createUnauthenticatedAuth } from "@octokit/auth-unauthenticated" ;
32+
33+ // https://github.com/octokit/app.js/blob/main/src/types.ts
34+ import type { Endpoints } from "@octokit/types" ;
35+
3036type Constructor < T > = new ( ...args : any [ ] ) => T ;
3137
3238type OctokitType < TOptions extends Options > =
@@ -64,6 +70,7 @@ export class App<TOptions extends Options = Options> {
6470 clientType : "github-app" ;
6571 Octokit : OctokitClassType < TOptions > ;
6672 } > ;
73+
6774 log : {
6875 debug : ( message : string , additionalInfo ?: object ) => void ;
6976 info : ( message : string , additionalInfo ?: object ) => void ;
@@ -136,9 +143,6 @@ export class App<TOptions extends Options = Options> {
136143 }
137144}
138145
139- import type { Octokit } from "@octokit/core" ;
140- import { createUnauthenticatedAuth } from "@octokit/auth-unauthenticated" ;
141-
142146export function webhooks (
143147 appOctokit : Octokit ,
144148 options : Required < Options > [ "webhooks" ] ,
@@ -173,12 +177,12 @@ export function webhooks(
173177 return new auth . octokit . constructor ( {
174178 ...auth . octokitOptions ,
175179 authStrategy : createAppAuth ,
176- ... {
180+
177181 auth : {
178182 ...auth ,
179183 installationId,
180- } ,
181- } ,
184+ }
185+ ,
182186 } ) ;
183187 } ,
184188 } ) ) as Octokit ;
@@ -201,9 +205,6 @@ export function webhooks(
201205 } ) ;
202206}
203207
204- // https://github.com/octokit/app.js/blob/main/src/types.ts
205- import type { Endpoints } from "@octokit/types" ;
206-
207208export type Options = {
208209 appId ?: number | string ;
209210 privateKey ?: string ;
0 commit comments