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

Function assertSha

src/commit-sweeper.ts:56–60  ·  view source on GitHub ↗
(value: string, label = "sha")

Source from the content-addressed store, hash-verified

54}
55
56function assertSha(value: string, label = "sha"): string {
57 const sha = value.trim();
58 if (!/^[0-9a-f]{40}$/i.test(sha)) throw new Error(`Invalid ${label}: ${value}`);
59 return sha.toLowerCase();
60}
61
62function repoSlug(targetRepo: string): string {
63 return repositoryProfileFor(targetRepo).slug;

Callers 6

commitReportRelativePathFunction · 0.70
commitMetadataFunction · 0.70
reviewCommandFunction · 0.70
commitShasArgFunction · 0.70
publishCheckCommandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected