MCPcopy
hub / github.com/openclaw/clawsweeper / markFailedReviewRetry

Function markFailedReviewRetry

src/clawsweeper.ts:15960–15984  ·  view source on GitHub ↗
(options: {
  markdown: string;
  status: "dispatched" | "exhausted";
  at: string;
  headSha: string;
  attempts: number;
  maxAttempts: number;
  reason: string;
  dispatchUrl?: string;
})

Source from the content-addressed store, hash-verified

15958}
15959
15960function markFailedReviewRetry(options: {
15961 markdown: string;
15962 status: "dispatched" | "exhausted";
15963 at: string;
15964 headSha: string;
15965 attempts: number;
15966 maxAttempts: number;
15967 reason: string;
15968 dispatchUrl?: string;
15969}): string {
15970 let next = options.markdown;
15971 next = replaceFrontMatterValue(next, "failed_review_retry_status", options.status);
15972 next = replaceFrontMatterValue(next, "failed_review_retry_count", String(options.attempts));
15973 next = replaceFrontMatterValue(next, "failed_review_retry_last_at", options.at);
15974 next = replaceFrontMatterValue(next, "failed_review_retry_head_sha", options.headSha);
15975 next = replaceFrontMatterValue(
15976 next,
15977 "failed_review_retry_reason",
15978 JSON.stringify(options.reason),
15979 );
15980 if (options.dispatchUrl) {
15981 next = replaceFrontMatterValue(next, "failed_review_retry_dispatch_url", options.dispatchUrl);
15982 }
15983 return appendSectionValue(next, "Failed Review Retry", failedReviewRetrySection(options));
15984}
15985
15986function dispatchFailedReviewRetry(options: {
15987 workflowRepo: string;

Callers 1

Calls 3

replaceFrontMatterValueFunction · 0.85
appendSectionValueFunction · 0.85
failedReviewRetrySectionFunction · 0.85

Tested by

no test coverage detected