UNPKG

alinea

Version:
17 lines (15 loc) 413 B
import "../../chunks/chunk-NZLE2WMY.js"; // src/cli/util/CommitMessage.ts function parseCoAuthoredBy(commitMessage) { const regex = /Co-authored-by:\s*(.+?)\s*<(\S+@\S+\.\S+)>/; const match = commitMessage.match(regex); if (match && match.length >= 3) { const name = match[1].trim(); const email = match[2].trim(); return { name, email }; } return void 0; } export { parseCoAuthoredBy };