ci: prefer latest PR build run for artifact comments

This commit is contained in:
Shantur Rathore
2026-03-20 17:56:31 +00:00
parent e989795de3
commit 0283493f2a

View File

@@ -66,7 +66,11 @@ jobs:
per_page: 100,
});
matchedRun = runs.find((run) => run.head_sha === headSha);
const matchingRuns = runs
.filter((run) => run.head_sha === headSha)
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
matchedRun = matchingRuns[0] || null;
if (matchedRun && matchedRun.status === 'completed') {
break;
}