Skip to content

Commit 50e2393

Browse files
authored
Adjust script to handle other event types (#2845)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 6d53d0d commit 50e2393

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/actions/check-authorization/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ runs:
1616
with:
1717
result-encoding: string
1818
script: |
19+
// Skip authorization check if event is not pull_request_target
20+
if (context.eventName !== 'pull_request_target') {
21+
console.log(`Event type is ${context.eventName}, skipping authorization check`);
22+
return null;
23+
}
24+
1925
try {
2026
const permissionResponse = await github.rest.repos.getCollaboratorPermissionLevel({
2127
owner: context.repo.owner,

0 commit comments

Comments
 (0)