MCPcopy Create free account
hub / github.com/pingdotgg/t3code / parseCustomCommitMessage

Function parseCustomCommitMessage

apps/server/src/git/GitManager.ts:431–447  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

429}
430
431function parseCustomCommitMessage(raw: string): { subject: string; body: string } | null {
432 const normalized = raw.replace(/\r\n/g, "\n").trim();
433 if (normalized.length === 0) {
434 return null;
435 }
436
437 const [firstLine, ...rest] = normalized.split("\n");
438 const subject = firstLine?.trim() ?? "";
439 if (subject.length === 0) {
440 return null;
441 }
442
443 return {
444 subject,
445 body: rest.join("\n").trim(),
446 };
447}
448
449function appendUnique(values: string[], next: string | null | undefined): void {
450 const trimmed = next?.trim() ?? "";

Callers 1

GitManager.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected