import { Logger } from '../contracts'; export interface IMap { [key: string]: T; } export interface IHandlerParams { buildArguments: { workspacepath: string; sendContributors: boolean; sendCommitTitles: boolean; }; commitToIndexMap: IMap; emailToIndexMap: IMap; } export interface IContributorData { contributorEmail: string; contributorName: string; } export interface IMissingContributor extends IContributorData { index: number; } export interface IContributors { contributors: IContributorData[]; emailToIndexMap: IMap; missingContributor?: IMissingContributor; } export interface IRawCommitLog { commit: string; authorDate: string; commiterDate: string; title: string; authorName: string; authorEmail: string; commiterName: string; commiterEmail: string; } export interface ICommitLog { commit: string; authorDate: number; commiterDate: number; title: string; authorName: string; authorEmail: string; commiterName: string; commiterEmail: string; } export interface ICommitLogWithContributorRef { commit: string; authorDate: number; commiterDate: number; title: string; contributorIndex: number; missingContributor?: IMissingContributor; } export interface IBranchHistory { commitHistory: string[]; commitLog: Array; commitToIndexMap: IMap; missingContributors?: IMissingContributor[]; } export interface IGitDiffFileStatus { path: string; op: 'added' | 'deleted' | 'modified' | 'renamed' | 'renamed-modified'; } export interface IScm { detectCommitVersion(handlerParams: IHandlerParams, logger: Logger): Promise; getBranchHistory(handlerParams: IHandlerParams, logger: Logger): Promise; getContributors(handlerParams: IHandlerParams, logger: Logger): Promise; getCommitsPerFile(handlerParams: IHandlerParams, logger: Logger): Promise>; getRepositoryUrl(handlerParams: IHandlerParams, logger: Logger): Promise; getRootDirectory(handlerParams: IHandlerParams, logger: Logger): Promise; getFiles(handlerParams: IHandlerParams, logger: Logger): Promise; getCommitOnlyHistory(historyLength: number, handlerParams: IHandlerParams, logger: Logger): Promise; getGitDiffs(refCommit: string, handlerParams: IHandlerParams, logger: Logger): Promise; getOpenGitBranches(handlerParams: IHandlerParams, logger: Logger): Promise; getCurrentGitBranch(handlerParams: IHandlerParams, logger: Logger): Promise; getGitSubmodules(handlerParams: IHandlerParams, logger: Logger): Promise; }