diff --git a/services/bots/src/github-webhook/github-webhook.service.ts b/services/bots/src/github-webhook/github-webhook.service.ts index a400685..1cbf47b 100644 --- a/services/bots/src/github-webhook/github-webhook.service.ts +++ b/services/bots/src/github-webhook/github-webhook.service.ts @@ -9,6 +9,8 @@ import { EventType, WEBHOOK_HANDLERS } from './github-webhook.const'; import { GithubClient, WebhookContext } from './github-webhook.model'; import { uniqueEntries } from './utils/list'; +const ignoredEventActions = new Set(['new_permissions_accepted']); + @Injectable() export class GithubWebhookService { private githubClient: GithubClient; @@ -51,6 +53,11 @@ export class GithubWebhookService { } async handleWebhook(headers: Record, payload: Record): Promise { + if (ignoredEventActions.has(payload.action)) { + // We do not handle these events. + return; + } + const context = new WebhookContext({ github: this.githubClient, eventType: `${headers['x-github-event']}.${payload.action}` as EventType,