From 8571a2083e899dd5ae589e700fd626b70e55b588 Mon Sep 17 00:00:00 2001 From: John White <750350+johnhwhite@users.noreply.github.com> Date: Wed, 6 Sep 2023 07:07:10 -0400 Subject: [PATCH] fix: support `pull_request_target` event (#103) --- find-successful-workflow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/find-successful-workflow.js b/find-successful-workflow.js index bc1181f..ca622fe 100644 --- a/find-successful-workflow.js +++ b/find-successful-workflow.js @@ -26,7 +26,7 @@ let BASE_SHA; const HEAD_SHA = execSync(`git rev-parse HEAD`, { encoding: 'utf-8' }); - if (eventName === 'pull_request') { + if (['pull_request','pull_request_target'].includes(eventName)) { BASE_SHA = execSync(`git merge-base origin/${mainBranchName} HEAD`, { encoding: 'utf-8' }); } else { try {