MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / parseGitLog

Function parseGitLog

packages/bumpy/src/commands/generate.ts:214–228  ·  view source on GitHub ↗

Parse raw git log output into individual commits

(raw: string)

Source from the content-addressed store, hash-verified

212
213/** Parse raw git log output into individual commits */
214function parseGitLog(raw: string): { hash: string; subject: string; body: string }[] {
215 const commits: { hash: string; subject: string; body: string }[] = [];
216 const entries = raw.split('---END---').filter((e) => e.trim());
217
218 for (const entry of entries) {
219 const lines = entry.trim().split('\n');
220 if (lines.length < 2) continue;
221 commits.push({
222 hash: lines[0]!.trim(),
223 subject: lines[1]!.trim(),
224 body: lines.slice(2).join('\n').trim(),
225 });
226 }
227 return commits;
228}
229
230/** Parse a commit subject into conventional commit format */
231function parseConventionalCommit(commit: { hash: string; subject: string; body: string }): ConventionalCommit | null {

Callers 1

generateCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…