From 9bc366dc866aef8de6f13e4e9501b8647fb1413b Mon Sep 17 00:00:00 2001 From: svenefftinge Date: Wed, 2 Aug 2023 14:34:32 +0000 Subject: [PATCH] [server] fix tsc complaining about complex type --- components/server/src/prebuilds/github-app.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/server/src/prebuilds/github-app.ts b/components/server/src/prebuilds/github-app.ts index 0fb9736007096a..44664ec713a9a7 100644 --- a/components/server/src/prebuilds/github-app.ts +++ b/components/server/src/prebuilds/github-app.ts @@ -111,7 +111,7 @@ export class GithubApp { res.redirect(301, this.getBadgeImageURL()); }); - app.on("installation.created", (ctx) => { + app.on("installation.created", (ctx: Context<"installation.created">) => { catchError( (async () => { const targetAccountName = `${ctx.payload.installation.account.login}`; @@ -136,7 +136,7 @@ export class GithubApp { })(), ); }); - app.on("installation.deleted", (ctx) => { + app.on("installation.deleted", (ctx: Context<"installation.deleted">) => { catchError( (async () => { const installationId = `${ctx.payload.installation.id}`; @@ -145,7 +145,7 @@ export class GithubApp { ); }); - app.on("repository.renamed", (ctx) => { + app.on("repository.renamed", (ctx: Context<"repository.renamed">) => { catchError( (async () => { const { action, repository, installation } = ctx.payload; @@ -172,7 +172,7 @@ export class GithubApp { // TODO(at): handle deleted as well }); - app.on("push", (ctx) => { + app.on("push", (ctx: Context<"push">) => { catchError(this.handlePushEvent(ctx)); });