mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-07-10 00:14:27 +00:00
ci: prefer latest PR build run for artifact comments
This commit is contained in:
parent
e989795de3
commit
0283493f2a
1 changed files with 5 additions and 1 deletions
6
.github/workflows/comment-pr-artifacts.yml
vendored
6
.github/workflows/comment-pr-artifacts.yml
vendored
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue