Skip to content

Commit 3186aee

Browse files
committed
chore: add pull_request_target
1 parent cb713c5 commit 3186aee

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github/handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export function shouldAddCommentToPullRequest(
6565

6666
return (
6767
(inputs.pullRequestReport || inputs.pullRequest) &&
68-
context.eventName === 'pull_request' &&
68+
(context.eventName === 'pull_request' ||
69+
context.eventName === 'pull_request_target') &&
6970
shouldAddComment
7071
)
7172
}

src/github/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function isMatchingWorkflowRun(
4949
run.event === 'workflow_dispatch')
5050

5151
const isPRMatch =
52-
(run.event === 'pull_request' &&
52+
((run.event === 'pull_request' || run.event === 'pull_request_target') &&
5353
run.pull_requests?.some(
5454
pr => pr.number === githubProperties.pullRequest.number
5555
)) ||

0 commit comments

Comments
 (0)