From 2a503aeb7a958c65338e51ca1b317647f6c29ae3 Mon Sep 17 00:00:00 2001 From: clearloop Date: Tue, 20 Aug 2024 03:13:25 +0800 Subject: [PATCH] fix(api): await for updating checks (#44) * ci(dummy): debug with failed action * fix(api): await update check * chore(api): bundle new api * ci(dispatch): get back correct exit code --- dist/index.js | 2 +- src/api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8877106..1d1c215 100644 --- a/dist/index.js +++ b/dist/index.js @@ -29021,7 +29021,7 @@ class Api { return job; } else { - this.updateCheck(check.id, job); + await this.updateCheck(check.id, job); check.status = job.status === 'waiting' ? 'in_progress' : job.status; check.conclusion = job.conclusion; diff --git a/src/api.ts b/src/api.ts index 2189e25..0ddd832 100644 --- a/src/api.ts +++ b/src/api.ts @@ -126,7 +126,7 @@ export default class Api { core.debug(`No need to update check ${job.name} .`); return job; } else { - this.updateCheck(check.id, job); + await this.updateCheck(check.id, job); check.status = job.status === 'waiting' ? 'in_progress' : job.status; check.conclusion = job.conclusion;