File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 fetch-depth : 0
7373
7474 - name : Download coverage artifacts
75- uses : actions/download-artifact@v6
75+ uses : actions/download-artifact@v7
7676 with :
7777 name : base-jacoco-xml
7878 path : coverage-artifacts
Original file line number Diff line number Diff line change 3030 persist-credentials : false
3131
3232 - name : Download coverage artifact
33- uses : actions/download-artifact@v6
33+ uses : actions/download-artifact@v7
3434 with :
3535 name : jacoco-coverage
3636 path : coverage
@@ -43,13 +43,16 @@ jobs:
4343 with :
4444 script : |
4545 const headSha = context.payload.workflow_run.head_sha;
46- const { data: pulls } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
46+ const headOwner = context.payload.workflow_run.head_repository.owner.login;
47+ const headBranch = context.payload.workflow_run.head_branch;
48+ const { data: pulls } = await github.rest.pulls.list({
4749 owner: context.repo.owner,
4850 repo: context.repo.repo,
49- commit_sha: headSha,
51+ state: 'all',
52+ head: `${headOwner}:${headBranch}`,
5053 });
51- if ( pulls.length > 0) {
52- const pr = pulls[0];
54+ const pr = pulls.find((p) => p.head.sha === headSha);
55+ if (pr) {
5356 core.setOutput('pr_number', pr.number);
5457 core.setOutput('pr_sha', headSha);
5558 core.setOutput('pr_branch', headBranch);
You can’t perform that action at this time.
0 commit comments