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

Function publishCheckCommand

src/commit-sweeper.ts:547–569  ·  view source on GitHub ↗
(args: Args)

Source from the content-addressed store, hash-verified

545}
546
547function publishCheckCommand(args: Args): void {
548 const targetRepo = argString(args, "target_repo", DEFAULT_TARGET_REPO);
549 const reportRepo = argString(
550 args,
551 "report_repo",
552 process.env.GITHUB_REPOSITORY ?? "openclaw/clawsweeper",
553 );
554 const reportPath = argString(args, "report_path", "");
555 if (!reportPath) throw new Error("Missing --report-path");
556 const markdown = readFileSync(reportPath, "utf8");
557 const { frontMatter } = splitFrontMatter(markdown);
558 const sha = assertSha(argString(args, "commit_sha", frontMatter.sha ?? ""));
559 const reportRelativePath =
560 argString(args, "report_relative_path", "") || commitReportRelativePath(targetRepo, sha);
561 publishCheckFromReport({
562 targetRepo,
563 reportRepo,
564 reportPath,
565 reportRelativePath,
566 sha,
567 checkName: argString(args, "check_name", COMMIT_REVIEW_CHECK_NAME),
568 });
569}
570
571function collectMarkdownFiles(dir: string): string[] {
572 if (!existsSync(dir)) return [];

Callers 1

mainFunction · 0.85

Calls 5

argStringFunction · 0.85
splitFrontMatterFunction · 0.85
commitReportRelativePathFunction · 0.85
publishCheckFromReportFunction · 0.85
assertShaFunction · 0.70

Tested by

no test coverage detected