UNPKG

@wocker/ws

Version:

Docker workspace for web projects

36 lines (35 loc) 910 B
import { AxiosInstance } from "axios"; type RepositoryInfo = { default_branch: string; }; export type GithubTag = { name: string; zipball_url: string; tarball_url: string; commit: { sha: string; url: string; }; node_id: string; }; export type GithubBranch = { name: string; commit: { sha: string; url: string; }; protected: boolean; }; export declare class GithubClient { readonly owner: string; readonly repository: string; constructor(owner: string, repository: string); get axios(): AxiosInstance; getInfo(): Promise<RepositoryInfo>; getBranches(): Promise<GithubBranch[]>; getTags(): Promise<GithubTag[]>; getFile(ref: string, path: string): Promise<any>; downloadZipByUrl(url: string, dirPath: string): Promise<void>; download(branch: string, dirPath: string): Promise<void>; } export {};