/** * Deterministic, tested helpers for the single squashed guest commit: detect * the repository's commit-message convention from its recent history, and render * the one commit message in that convention. Pure string functions over content * the caller has already read (recent `git log` subjects), so they do no I/O and * are unit-testable — the same house style as `contributing-policy.ts`. */ /** The commit-message convention a repository follows. */ export type CommitConvention = 'conventional' | 'sentence'; /** * Classify a repo's commit convention from recent `git log` subject lines. * Merge commits and blank lines are ignored. When a majority of the remaining * subjects match the Conventional Commits prefix → `'conventional'`; otherwise * `'sentence'` (plain sentence-case). The tie-break and the no-signal case both * resolve to `'sentence'` — the safer, least-assuming default for an unknown * repo. */ export declare function detectCommitConvention(recentSubjects: string[]): CommitConvention; export interface GuestCommitMessageOptions { /** The detected repository convention. */ convention: CommitConvention; /** The change title (e.g. the plan title). Never includes an issue number. */ title: string; /** Optional commit body. */ body?: string; /** When provided, appends a `Signed-off-by` trailer (DCO). */ signOff?: { name: string; email: string; }; } /** * Render the single squashed guest commit message in the detected convention. * * - `conventional`: reuse an explicit type prefix already present in `title` * (e.g. `fix: ...`), otherwise prefix `chore: `. * - `sentence`: a capitalised plain sentence, no type prefix. * * Never includes an issue/PR number (the reference lives in the PR body only). * Appends a `Signed-off-by: ` trailer only when `signOff` is * given (Phase 1's DCO detection gates this upstream). */ export declare function formatGuestCommitMessage(opts: GuestCommitMessageOptions): string; //# sourceMappingURL=commit-convention.d.ts.map