type Fetch = typeof fetch; export interface GitHubClientOptions { apiToken?: string; apiUrl?: string; fetch?: Fetch; } export interface GitHubRepository { default_branch: string; } export interface GitHubRef { ref?: string; object: { sha: string; }; } export interface GitHubFile { sha: string; content?: string; encoding?: string; } export interface GitHubPullRequest { number: number; state?: string; html_url: string; merged_at?: string | null; } export interface PutFileInput { repository: string; path: string; branch: string; content: string; message: string; sha?: string; } export interface CreatePullRequestInput { repository: string; title: string; head: string; base: string; body?: string; } export declare class GitHubHttpError extends Error { readonly status: number; readonly path: string; readonly responseText: string; constructor(status: number, path: string, responseText: string); } export declare class GitHubNetworkError extends Error { readonly url: string; readonly cause: unknown; constructor(url: string, cause: unknown); } export declare class GitHubClient { private readonly apiToken?; private readonly apiUrl; private readonly fetchImpl; constructor(options?: GitHubClientOptions); getRepository(repository: string): Promise; getBranchRef(repository: string, branch: string): Promise; createBranch(repository: string, branch: string, sha: string): Promise; getFile(repository: string, path: string, branch: string): Promise; putFile(input: PutFileInput): Promise; findOpenPullRequest(repository: string, branch: string): Promise; getPullRequest(repository: string, number: number): Promise; createPullRequest(input: CreatePullRequestInput): Promise; private request; } export declare function decodeGitHubFileContent(file: GitHubFile | null): string | null; export {}; //# sourceMappingURL=client.d.ts.map