Skip to content

Commit

Permalink
Fix context event check
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Jun 20, 2024
1 parent ac1a1d8 commit 0280820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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...')
Expand Down

0 comments on commit 0280820

Please # to comment.