(markdown: string)
| 428 | } |
| 429 | |
| 430 | function 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 | |
| 446 | function findingKinds(markdown: string) { |
| 447 | return [ |
no test coverage detected