From 050be7add8725ef7e7f7042affc28a51193e527c Mon Sep 17 00:00:00 2001 From: galargh Date: Thu, 20 Jun 2024 15:57:18 +0100 Subject: [PATCH] Fix pr context extraction --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dfa6059..6e58e6f 100644 --- a/index.js +++ b/index.js @@ -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) {