Skip to content

Commit

Permalink
Fix pr context extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Jun 20, 2024
1 parent 0280820 commit 050be7a
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 @@ -76,7 +76,7 @@ async function run() {
}
core.info('Finding matching pull requests...')
const pull_requests = await octokit.paginate(octokit.rest.issues.search, {
q: `is:pr repo:${owner}/${repo} head:${github.context.payload.head_branch} base:${github.context.payload.base_branch} ${github.context.payload.commit.id}`
q: `is:pr repo:${owner}/${repo} head:${github.context.payload.workflow_run.head_branch} base:${github.context.payload.workflow_run.base_branch} ${github.context.payload.workflow_run.head_commit.id}`
})
core.debug(`Pull requests: ${JSON.stringify(pull_requests, null, 2)}`)
if (pull_requests.length === 0) {
Expand Down

0 comments on commit 050be7a

Please # to comment.