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

Function checkRunsForCommit

src/commit-checks.ts:102–116  ·  view source on GitHub ↗
(targetRepo: string, sha: string, name: string)

Source from the content-addressed store, hash-verified

100}
101
102function checkRunsForCommit(targetRepo: string, sha: string, name: string): { id?: number }[] {
103 const encodedName = encodeURIComponent(name);
104 try {
105 const raw = run("gh", [
106 "api",
107 `repos/${targetRepo}/commits/${sha}/check-runs?check_name=${encodedName}`,
108 "--jq",
109 ".check_runs",
110 ]);
111 const parsed = JSON.parse(raw) as unknown;
112 return Array.isArray(parsed) ? (parsed as { id?: number }[]) : [];
113 } catch {
114 return [];
115 }
116}
117
118export function publishCheckFromReport(options: PublishCheckOptions): void {
119 const markdown = readFileSync(options.reportPath, "utf8");

Callers 1

publishCheckFromReportFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected