import { ICommit } from 'gitlog'; import { AsyncSeriesBailHook, AsyncSeriesWaterfallHook } from 'tapable'; export interface ICommitAuthor { /** Author's name */ name?: string; /** Author's email */ email?: string; /** Author's username */ username?: string; /** The commit this author created */ hash?: string; } export interface IPullRequest { /** The issue number for the pull request */ number: number; /** The base branch the pull request is on */ base?: string; /** The body of the PR (opening comment) */ body?: string; } export declare type IExtendedCommit = ICommit & { /** The authors that contributed to the pull request */ authors: ICommitAuthor[]; /** The pull request information */ pullRequest?: IPullRequest; /** Labels associated with the commit */ labels: string[]; }; /** Parse the PR information for the merge commit message */ export declare function parsePR(commit: IExtendedCommit): IExtendedCommit; /** Parse the PR information for the squashed commit message */ export declare function parseSquashPR(commit: IExtendedCommit): IExtendedCommit; export interface ILogParseHooks { /** Parse information about a commit from a commit. Here is where `auto` gets the PR number from the merge commits. */ parseCommit: AsyncSeriesWaterfallHook<[IExtendedCommit]>; /** Choose to omit certain commits. If you return true the commit will be omitted. Be sure to return nothing if you don't want the commit omitted. */ omitCommit: AsyncSeriesBailHook<[IExtendedCommit], boolean | void>; } /** * Parse the gitlog for commits that are PRs and attach their labels. * This class can also be tapped into via plugin to parse commits * in other ways (ex: conventional-commits) */ export default class LogParse { /** Plugin entry points */ hooks: ILogParseHooks; /** Initialize the log parser and tap the default functionality */ constructor(); /** Run the log parser over a set of commits */ normalizeCommits(commits: ICommit[]): Promise; /** Process a commit to find it's labels and PR information */ normalizeCommit(commit: ICommit): Promise; } //# sourceMappingURL=log-parse.d.ts.map