@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
28 lines (27 loc) • 762 B
TypeScript
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 {};