Skip to content

Commit ba3d085

Browse files
Copilotpelikhan
andauthored
Document PR review retry behavior
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent db4a431 commit ba3d085

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

actions/setup/js/pr_review_buffer.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const FALLBACK_EMPTY_COMMENT_BODY = "_(empty comment body)_";
3535
const FALLBACK_TRUNCATION_SUFFIX = "\n\n_(Fallback review body truncated to fit GitHub length limits.)_";
3636
const FALLBACK_OMISSION_NOTE = "_(Unanchored comment details omitted to fit GitHub length limits.)_";
3737
const ELLIPSIS = "…";
38+
// Keep review retries bounded so safe-outputs can recover from short installation-token
39+
// quota stalls without spending most of the workflow timeout waiting for a reset.
3840
const REVIEW_RATE_LIMIT_RETRY_CONFIG = {
3941
...RATE_LIMIT_RETRY_CONFIG,
4042
maxRetries: 1,
@@ -534,6 +536,8 @@ function createReviewBuffer() {
534536
}
535537

536538
async function fetchAfterStateIfAvailable() {
539+
// Only fetch after-state when before-state capture succeeded; otherwise we are
540+
// already in degraded mode and avoid spending another API call on metadata.
537541
return beforeState ? fetchReviewStateBestEffort(repoParts, pullRequestNumber, "after") : null;
538542
}
539543

0 commit comments

Comments
 (0)