()
| 52 | } |
| 53 | |
| 54 | function getBaseSha() { |
| 55 | const lastReleaseSha = runGit(`log --format=%H --grep="^${RELEASE_COMMIT_PREFIX}" -n 1 HEAD`) |
| 56 | if (lastReleaseSha) return lastReleaseSha |
| 57 | |
| 58 | const roots = runGit('rev-list --max-parents=0 HEAD') |
| 59 | return roots.split('\n').map((line) => line.trim()).filter(Boolean).at(-1) |
| 60 | } |
| 61 | |
| 62 | function parseCommitRecords(baseSha) { |
| 63 | const raw = runGit(`log --format=%H%x1f%s%x1f%b%x1e ${baseSha}..HEAD`) |