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

Function parseCommitRecords

scripts/generate-semantic-changeset.mjs:62–78  ·  view source on GitHub ↗
(baseSha)

Source from the content-addressed store, hash-verified

60}
61
62function 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
80function getCommitBump(commit) {
81 const headerMatch = commit.subject.match(/^([a-z]+)(\([^)]*\))?(!)?:\s+/i)

Callers 1

mainFunction · 0.85

Calls 1

runGitFunction · 0.85

Tested by

no test coverage detected