commitmnt
Version:
Copy your gitlab and bitbucket commits to a new, publishable github repo
33 lines (32 loc) • 1.36 kB
TypeScript
/** @module Main */
import { Config } from './types';
import { Cache } from './utils';
/**
* Initialize a cache and set of functions that can be utilized to copy
* commits from some repository to another repository. These are the same
* functions used under the hood of the main `commitment()` function. They are being
* exposed here so that a user with a more specific use case
* (eg. filtering the commits in some way before copying them) can do that if they desire.
*
* @param config subset of {@link Config} fields
* @returns a {@link Cache} instance, and the initialized {@link getCommitsForRepo} {@link copyRepo} {@link copyCommitsToRepo} functions
*
* @category Public API
*/
export declare function initCommitment(config: Pick<Config, 'branch' | 'rootDir'>): Promise<{
cache: Cache;
copyCommitsToRepo: (dates: string[]) => Promise<number>;
copyRepo: (repo: import("./types").Repository) => Promise<number>;
getCommitsForRepo: (repo: import("./types").Repository) => Promise<string[]>;
}>;
/**
* Accepts a config and copys commits from the
* given repositories into the current repository
*
* @param options.quiet silences the console output / spinner
*
* @category Public API
*/
export declare function commitment(config: Config, options?: {
quiet: boolean;
}): Promise<void>;