From 67b0028dbac710c32591662c77d72ff311b6e493 Mon Sep 17 00:00:00 2001 From: abhisek Date: Thu, 17 Oct 2024 22:00:51 +0530 Subject: [PATCH] feat: Add support for PR target event --- dist/index.js | 3 ++- src/vet.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 504c803..1f7a594 100644 --- a/dist/index.js +++ b/dist/index.js @@ -33271,7 +33271,8 @@ class Vet { else if (eventType === 'schedule') { this.runOnSchedule(); } - else if (eventType === 'pull_request') { + else if (eventType === 'pull_request' || + eventType === 'pull_request_target') { sarifReportPath = await this.runOnPullRequest(); } else { diff --git a/src/vet.ts b/src/vet.ts index 388a0d6..0f26e15 100644 --- a/src/vet.ts +++ b/src/vet.ts @@ -77,7 +77,10 @@ export class Vet { sarifReportPath = await this.runOnPush() } else if (eventType === 'schedule') { this.runOnSchedule() - } else if (eventType === 'pull_request') { + } else if ( + eventType === 'pull_request' || + eventType === 'pull_request_target' + ) { sarifReportPath = await this.runOnPullRequest() } else { throw new Error(`Unsupported event type: ${eventType}`)