MCPcopy Create free account
hub / github.com/TanStack/cli / getBaseSha

Function getBaseSha

scripts/generate-semantic-changeset.mjs:54–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54function 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
62function parseCommitRecords(baseSha) {
63 const raw = runGit(`log --format=%H%x1f%s%x1f%b%x1e ${baseSha}..HEAD`)

Callers 1

mainFunction · 0.85

Calls 1

runGitFunction · 0.85

Tested by

no test coverage detected