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; }