From 601987767283422a4764054d2bc976d139a09979 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Mon, 31 Aug 2020 21:33:54 +0800 Subject: [PATCH] fix(github): fix 202 still processing workaround @octokit/webhooks for koa --- packages/plugin-github/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/plugin-github/src/index.ts b/packages/plugin-github/src/index.ts index e4e98fc528..f501c22d38 100644 --- a/packages/plugin-github/src/index.ts +++ b/packages/plugin-github/src/index.ts @@ -83,6 +83,8 @@ export function apply(ctx: Context, config: Config = {}) { const { router, database } = ctx router.post(config.webhook, (ctx, next) => { + // workaround @octokit/webhooks for koa + ctx.req['body'] = ctx.request.body return webhooks.middleware(ctx.req, ctx.res, next) })