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

Function writeSelfHealJob

src/repair/conflict-self-heal.ts:356–375  ·  view source on GitHub ↗
(candidate: LooseRecord)

Source from the content-addressed store, hash-verified

354}
355
356function writeSelfHealJob(candidate: LooseRecord) {
357 const absolute = path.join(repoRoot(), candidate.job_path);
358 fs.mkdirSync(path.dirname(absolute), { recursive: true });
359 fs.writeFileSync(
360 absolute,
361 renderSelfHealJob({
362 repo,
363 issueNumber: candidate.number,
364 title: candidate.title,
365 branch: candidate.branch,
366 headSha: candidate.head_sha,
367 mergeState: candidate.reason,
368 runUrl: currentActionsRunUrl(),
369 }),
370 "utf8",
371 );
372 const job = parseJob(candidate.job_path);
373 const errors = validateJob(job);
374 if (errors.length > 0) throw new Error(`invalid self-heal job ${candidate.job_path}: ${errors}`);
375}
376
377function postSelfHealStatus(candidate: LooseRecord, { status }: { status: string }) {
378 const body = renderSelfHealStatusComment({

Callers 1

executeDispatchesFunction · 0.85

Calls 5

renderSelfHealJobFunction · 0.85
parseJobFunction · 0.85
validateJobFunction · 0.85
repoRootFunction · 0.70
currentActionsRunUrlFunction · 0.70

Tested by

no test coverage detected