(args: Args)
| 545 | } |
| 546 | |
| 547 | function 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 | |
| 571 | function collectMarkdownFiles(dir: string): string[] { |
| 572 | if (!existsSync(dir)) return []; |
no test coverage detected