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

Function parseCommitReport

src/repair/commit-finding-intake.ts:430–444  ·  view source on GitHub ↗
(markdown: string)

Source from the content-addressed store, hash-verified

428}
429
430function parseCommitReport(markdown: string) {
431 const match = markdown.match(/^---\n([\s\S]*?)\n---\n?/);
432 const frontmatter: Record<string, unknown> = {};
433 if (match) {
434 for (const line of (match[1] ?? "").split(/\r?\n/)) {
435 const kv = line.match(/^([A-Za-z0-9_-]+):\s*(.*)$/);
436 if (!kv) continue;
437 frontmatter[kv[1] ?? ""] = stripQuotes(kv[2] ?? "");
438 }
439 }
440 return {
441 ...frontmatter,
442 body: match ? markdown.slice(match[0].length) : markdown,
443 };
444}
445
446function findingKinds(markdown: string) {
447 return [

Callers 1

prepareFunction · 0.85

Calls 2

matchMethod · 0.80
stripQuotesFunction · 0.70

Tested by

no test coverage detected