UNPKG

tiny-conventional-commits-parser

Version:
37 lines (32 loc) 1.17 kB
interface GitCommitAuthor { name: string; email: string; } interface RawGitCommit { message: string; body: string; shortHash: string; author: GitCommitAuthor; data: string; } interface Reference { type: 'issue' | 'pull-request'; value: string; } interface GitCommit extends Omit<RawGitCommit, 'author'> { isConventional: boolean; description: string; type: string; scope: string; references: Reference[]; authors: GitCommitAuthor[]; isBreaking: boolean; } declare function getLastGitTag(): string | undefined; declare function getCurrentGitTag(): string | undefined; declare function getGitLog(from: string | undefined, to?: string): string[]; declare function parseRawCommit(commit: string): RawGitCommit; declare function parseCommit(rawCommit: RawGitCommit): GitCommit; declare function getCommits(from?: string, to?: string): GitCommit[]; declare function getRecentCommits(from?: string, to?: string): GitCommit[]; export { type GitCommit, type GitCommitAuthor, type RawGitCommit, type Reference, getCommits, getCurrentGitTag, getGitLog, getLastGitTag, getRecentCommits, parseCommit, parseRawCommit };