import { Project } from "./project/project"; import { GitHubAppCredential, GitHubCredential } from "./secrets"; export interface CloneOptions { /** * If this is true, the implementation should keep the directory at least * for the duration of the current process. If it's false, persistence can be treated * in any way. */ keep?: boolean; /** * If this is true, always make a full clone. * If it's false, and we want the master branch, and we're cloning into a transient * place, then clone with `--depth 1` to save time. */ alwaysDeep?: boolean; /** * If we are not doing a deep clone (alwaysDeep is false), * then the default is to clone only one branch. * Set noSingleBranch to true to clone the tips of all branches instead. * This passes `--no-single-branch` to `git clone`. * If alwaysDeep is true, this option has no effect. */ noSingleBranch?: boolean; /** * Set this to the number of commits that should be cloned into the transient * place. This only applies when alwaysDeep is set to false. */ depth?: number; /** * If you really want the SHA, not the tip of the branch that we've checked out, * then request a detached HEAD at that SHA. */ detachHead?: boolean; /** * Path to clone into */ path?: string; /** * If set to true symlinks will be cloned as links; if set to false (default) * symlinks are cloned as small files instead. */ symLinks?: boolean; } export declare function gitHubComRepository(details: { owner: string; repo: string; branch?: string; sha?: string; credential: GitHubCredential | GitHubAppCredential; }): AuthenticatedRepositoryId; export declare enum RepositoryProviderType { GitHubCom = 0, GitHubEnterprise = 1 } export interface RepositoryId { owner: string; repo: string; branch?: string; sha?: string; type: RepositoryProviderType; apiUrl?: string; gitUrl?: string; } export interface AuthenticatedRepositoryId extends RepositoryId { credential: T; cloneUrl(): string; } export interface ProjectLoader { load(id: AuthenticatedRepositoryId, baseDir: string): Promise>; clone(id: AuthenticatedRepositoryId, options?: CloneOptions): Promise>; } export declare function createProjectLoader(): ProjectLoader; export declare class DefaultProjectLoader implements ProjectLoader { load(id: AuthenticatedRepositoryId, baseDir: string): Promise; clone(id: AuthenticatedRepositoryId, options?: CloneOptions): Promise; } //# sourceMappingURL=project.d.ts.map