UNPKG

@naturalcycles/nodejs-lib

Version:
28 lines (27 loc) 762 B
import type { UnixTimestamp } from '@naturalcycles/js-lib/types'; /** * Set of utility functions to work with git. */ declare class Git2 { getLastGitCommitMsg(): string; commitMessageToTitleMessage(msg: string): string; hasUncommittedChanges(): boolean; /** * Returns true if there were changes */ commitAll(msg: string): boolean; /** * @returns true if there are not pushed commits. */ isAhead(): boolean; fetch(): void; pull(): void; push(): void; getCurrentCommitSha(full?: boolean): string; getCurrentCommitTimestamp(): UnixTimestamp; getCurrentBranchName(): string; getCurrentRepoName(): string; getAllBranchesNames(): string[]; } export declare const git2: Git2; export {};