export declare const DEEP_REVIEW_CHECK_NAME = "Pioneer deep review"; export interface GitHubActor { readonly id: string; readonly login: string; } export interface GitHubRepository { readonly owner: string; readonly name: string; readonly id?: string; } export interface GitHubPullRequest { readonly number: number; readonly title: string; readonly body: string; readonly htmlUrl: string; readonly baseRef: string; readonly baseSha: string; readonly headSha: string; } export interface GitHubCommit { readonly sha: string; readonly title: string; readonly body: string; } export type GitHubPullFileStatus = "added" | "modified" | "deleted" | "renamed" | "copied"; export interface GitHubPullFile { readonly path: string; readonly previousPath?: string; readonly status: GitHubPullFileStatus; readonly additions: number; readonly deletions: number; readonly patch?: string; } export type GitHubReviewSide = "LEFT" | "RIGHT"; export interface GitHubReviewComment { readonly id: string; readonly authorId: string; readonly authorLogin: string; readonly body: string; readonly path?: string; readonly line?: number; readonly side?: GitHubReviewSide; readonly startLine?: number; readonly startSide?: GitHubReviewSide; readonly commitId?: string; readonly inReplyToId?: string; } export type GitHubCheckStatus = "queued" | "in_progress" | "completed"; export type GitHubCheckConclusion = "success" | "failure" | "neutral" | "cancelled" | "skipped" | "timed_out" | "action_required"; export interface GitHubCheckRun { readonly id: string; readonly name: string; readonly status: GitHubCheckStatus; readonly conclusion?: GitHubCheckConclusion; readonly headSha: string; readonly detailsUrl?: string; } export interface CreateCheckRunInput { readonly owner: string; readonly repo: string; readonly name: string; readonly headSha: string; readonly status: GitHubCheckStatus; readonly conclusion?: GitHubCheckConclusion; readonly output?: GitHubCheckOutput; readonly externalId?: string; } export interface UpdateCheckRunInput { readonly owner: string; readonly repo: string; readonly checkRunId: string; readonly status?: GitHubCheckStatus; readonly conclusion?: GitHubCheckConclusion; readonly output?: GitHubCheckOutput; } export interface GitHubCheckOutput { readonly title: string; readonly summary: string; } export interface InlineReviewCommentInput { readonly path: string; readonly body: string; readonly side: GitHubReviewSide; readonly line: number; readonly startLine?: number; readonly startSide?: GitHubReviewSide; } export interface CreatePullRequestReviewInput { readonly owner: string; readonly repo: string; readonly pullNumber: number; readonly commitId: string; readonly event: "COMMENT"; readonly comments: readonly InlineReviewCommentInput[]; } export interface GitHubClient { getAuthenticatedActor(): Promise; getRepository(owner: string, repo: string): Promise; getPullRequest(owner: string, repo: string, pullNumber: number): Promise; listPullCommits(owner: string, repo: string, pullNumber: number): Promise; listPullFiles(owner: string, repo: string, pullNumber: number): Promise; listReviewComments(owner: string, repo: string, pullNumber: number): Promise; listCheckRunsForRef(owner: string, repo: string, ref: string, checkName?: string): Promise; createCheckRun(input: CreateCheckRunInput): Promise; updateCheckRun(input: UpdateCheckRunInput): Promise; updateReviewComment(owner: string, repo: string, commentId: string, body: string): Promise; createPullRequestReview(input: CreatePullRequestReviewInput): Promise<{ readonly id: string; }>; } export declare class GitHubApiError extends Error { readonly status: number; constructor(message: string, status: number); } export declare function parseGitHubLinkNext(linkHeader: string | null): string | undefined; export declare function sanitizeGitHubErrorMessage(message: string, token?: string): string; export interface FetchGitHubClientOptions { readonly token: string; readonly fetchImpl?: typeof fetch; readonly apiBaseUrl?: string; } export declare function createFetchGitHubClient(options: FetchGitHubClientOptions): GitHubClient; //# sourceMappingURL=client.d.ts.map