From 8ed8a8491298d5023f37b207e432e92129183adc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Feb 2021 07:31:03 +0100 Subject: [PATCH] chore: Bump @octokit/webhooks from 7.21.0 to 8.4.1 in /modules/webhook/lambdas/webhook (#573) * chore: Bump @octokit/webhooks in /modules/webhook/lambdas/webhook Bumps [@octokit/webhooks](https://github.com/octokit/webhooks.js) from 7.21.0 to 8.4.1. - [Release notes](https://github.com/octokit/webhooks.js/releases) - [Commits](https://github.com/octokit/webhooks.js/compare/v7.21.0...v8.4.1) Signed-off-by: dependabot[bot] * fix: dependabot bump webhook Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niek Palm --- modules/webhook/lambdas/webhook/package.json | 5 +++-- .../lambdas/webhook/src/webhook/handler.ts | 6 +++--- modules/webhook/lambdas/webhook/yarn.lock | 19 +++++++++++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/modules/webhook/lambdas/webhook/package.json b/modules/webhook/lambdas/webhook/package.json index a3731677c1..33ae43f29e 100644 --- a/modules/webhook/lambdas/webhook/package.json +++ b/modules/webhook/lambdas/webhook/package.json @@ -15,6 +15,7 @@ "format-check": "prettier --check \"**/*.ts\"" }, "devDependencies": { + "@octokit/webhooks-definitions": "^3.61.1", "@types/express": "^4.17.11", "@types/jest": "^26.0.20", "@types/node": "^14.14.31", @@ -32,6 +33,6 @@ }, "dependencies": { "@octokit/rest": "^18.2.0", - "@octokit/webhooks": "^7.21.0" + "@octokit/webhooks": "^8.4.1" } -} \ No newline at end of file +} diff --git a/modules/webhook/lambdas/webhook/src/webhook/handler.ts b/modules/webhook/lambdas/webhook/src/webhook/handler.ts index 74edb1a9a5..5ec86bbdd1 100644 --- a/modules/webhook/lambdas/webhook/src/webhook/handler.ts +++ b/modules/webhook/lambdas/webhook/src/webhook/handler.ts @@ -1,7 +1,7 @@ import { IncomingHttpHeaders } from 'http'; import { Webhooks } from '@octokit/webhooks'; import { sendActionRequest } from '../sqs'; -import { EventPayloads } from '@octokit/webhooks'; +import { CheckRunEvent } from '@octokit/webhooks-definitions/schema'; import { decrypt } from '../kms'; export const handle = async (headers: IncomingHttpHeaders, payload: any): Promise => { @@ -39,7 +39,7 @@ export const handle = async (headers: IncomingHttpHeaders, payload: any): Promis console.debug(`Received Github event: "${githubEvent}"`); if (githubEvent === 'check_run') { - const body = JSON.parse(payload) as EventPayloads.WebhookPayloadCheckRun; + const body = JSON.parse(payload) as CheckRunEvent; let installationId = body.installation?.id; if (installationId == null) { installationId = 0; @@ -50,7 +50,7 @@ export const handle = async (headers: IncomingHttpHeaders, payload: any): Promis repositoryName: body.repository.name, repositoryOwner: body.repository.owner.login, eventType: githubEvent, - installationId: installationId + installationId: installationId, }); } } else { diff --git a/modules/webhook/lambdas/webhook/yarn.lock b/modules/webhook/lambdas/webhook/yarn.lock index b33b5e92c4..f0e4741b53 100644 --- a/modules/webhook/lambdas/webhook/yarn.lock +++ b/modules/webhook/lambdas/webhook/yarn.lock @@ -638,12 +638,23 @@ dependencies: "@octokit/openapi-types" "^5.1.0" -"@octokit/webhooks@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@octokit/webhooks/-/webhooks-7.21.0.tgz#2aee3404aa311740a5f4ea37b070268752e21b02" - integrity sha512-Mj7Pa6JZgSjfzQfYF3Bf5KpyhzEBv4kHbj2EjCB/vMQiZCiiW30j5rS6t/d0ZN0FBrlSOuJIT+YU8IJt30VyWA== +"@octokit/webhooks-definitions@3.61.0": + version "3.61.0" + resolved "https://registry.yarnpkg.com/@octokit/webhooks-definitions/-/webhooks-definitions-3.61.0.tgz#78ac9821f9122d3d9e8b099ba6033e47f755e885" + integrity sha512-Iu2rMpCU0y25T4rIMoAKyQRWf/YJZnJKbIzzrKQMQJRIiORe4AGev1GLgf5zUcnz9twQ23DYEFLpDLVHViwTDQ== + +"@octokit/webhooks-definitions@^3.61.1": + version "3.61.1" + resolved "https://registry.yarnpkg.com/@octokit/webhooks-definitions/-/webhooks-definitions-3.61.1.tgz#2dd13aa7562a191f5474a983d4d5622e29c72a2e" + integrity sha512-Zse9eUHz4dzQic1CSxhN5tpUh3mjfc9Nl5GMOo6c6ZDTgpreOscBWD4cMQ9Rc689rt+Zb1bbplPrR8rsF6WbBw== + +"@octokit/webhooks@^8.4.1": + version "8.4.1" + resolved "https://registry.yarnpkg.com/@octokit/webhooks/-/webhooks-8.4.1.tgz#4490ded72e76988c02f99cdf2300ab5499f09a21" + integrity sha512-XV7VWuV13ltfuYREWX+3yrHFjBGalHrkzba5ht2q92s3RzFQH28NU+ZJADwbozFf5rY9fLtrVuhEsHPnaPxGrg== dependencies: "@octokit/request-error" "^2.0.2" + "@octokit/webhooks-definitions" "3.61.0" aggregate-error "^3.1.0" debug "^4.0.0"