From 6f2594f99441f7007d337604ae2b242a2a5916f1 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:35:53 +0800 Subject: [PATCH] fix: keep review progress best effort --- src/actions/runReview.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/actions/runReview.ts b/src/actions/runReview.ts index 9a1bd43..0b4c30b 100644 --- a/src/actions/runReview.ts +++ b/src/actions/runReview.ts @@ -162,7 +162,10 @@ async function main(): Promise { } const progress = prPayload.action === "synchronize" - ? await beginCommitReviewProgress(octokit, ref) + ? await beginCommitReviewProgress(octokit, ref).catch((progressError: unknown) => { + logger.warn({ error: progressError, ...ref }, "Failed to publish review start progress; continuing review."); + return undefined; + }) : undefined; try { await processPullRequest( @@ -171,9 +174,6 @@ async function main(): Promise { config.reviewStrictness === "strict" ? "strict" : "normal", github.token ); - if (progress) { - await finishCommitReviewProgress(octokit, { ...ref, ...progress }); - } } catch (error) { if (progress) { await finishCommitReviewProgress(octokit, { ...ref, ...progress, failed: true }).catch( @@ -184,6 +184,13 @@ async function main(): Promise { } throw error; } + if (progress) { + await finishCommitReviewProgress(octokit, { ...ref, ...progress }).catch( + (progressError: unknown) => { + logger.warn({ error: progressError, ...ref }, "Failed to publish review completion progress."); + } + ); + } return; }