(baseSha)
| 60 | } |
| 61 | |
| 62 | function parseCommitRecords(baseSha) { |
| 63 | const raw = runGit(`log --format=%H%x1f%s%x1f%b%x1e ${baseSha}..HEAD`) |
| 64 | if (!raw) return [] |
| 65 | |
| 66 | return raw |
| 67 | .split('\x1e') |
| 68 | .map((entry) => entry.trim()) |
| 69 | .filter(Boolean) |
| 70 | .map((entry) => { |
| 71 | const [sha, subject, body = ''] = entry.split('\x1f') |
| 72 | return { |
| 73 | sha, |
| 74 | subject: subject ?? '', |
| 75 | body, |
| 76 | } |
| 77 | }) |
| 78 | } |
| 79 | |
| 80 | function getCommitBump(commit) { |
| 81 | const headerMatch = commit.subject.match(/^([a-z]+)(\([^)]*\))?(!)?:\s+/i) |