Skip to content

Commit 6d5f34f

Browse files
committed
bump 14
1 parent 0b6b186 commit 6d5f34f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/manage-integration-check.yml

+16
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ jobs:
1818
script: |
1919
const external_id = context.payload.workflow_run.html_url;
2020
const head_sha = context.payload.workflow_run.head_sha;
21+
const runs = await github.paginate(github.rest.checks.listForRef, {
22+
...context.repo,
23+
ref: head_sha,
24+
check_name: "integration-test-result",
25+
external_id,
26+
})
27+
core.debug(`integration-test-result check runs: ${JSON.stringify(runs, null, 2)}`);
28+
const filtRuns = runs.filter(run => run.status !== 'completed');
29+
const descRuns = filtRuns.sort((a, b) => Date.parse(b.started_at) - Date.parse(a.started_at));
30+
const run = descRuns[0];
31+
32+
if (run) {
33+
// Check already exists.
34+
return run.id;
35+
}
36+
2137
const check = await github.rest.checks.create({
2238
...context.repo,
2339
head_sha,

0 commit comments

Comments
 (0)