From 02808201f4e874fe60d0c1e277e0f71ff8e21ce0 Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 20 Jun 2024 15:55:04 +0100 Subject: [PATCH] Fix context event check --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 38c3287..dfa6059 100644 --- a/index.js +++ b/index.js @@ -71,7 +71,7 @@ async function run() { core.info('Inferring the pull request number...') let pull_number if (pull_number_option === '') { - if (github.context.eventName !== 'workflow_run' || github.context.payload.event !== 'pull_request') { + if (github.context.eventName !== 'workflow_run' || github.context.payload.workflow_run.event !== 'pull_request') { throw new Error('The pull request number must be provided when not running in a workflow run event (triggered by pull_request event) context.') } core.info('Finding matching pull requests...')