import { Octokit } from "@octokit/rest"; import type { RepoMetaData } from "../dsl/types.ts"; import type { GitHubPRDSL, GitHubCommit, GitHubReview, GitHubReviewers, GitHubIssue, GitHubIssueComment } from "./types.ts"; /** A file returned by the GitHub PR files endpoint */ export interface GitHubFile { sha: string; filename: string; status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; additions: number; deletions: number; changes: number; patch?: string; previous_filename?: string; } /** The GitHub API handle - a plain data object with an Octokit instance and repo context */ export interface GitHubAPIClient { octokit: Octokit; owner: string; repo: string; prNumber: number; } /** Create a GitHub API client */ export declare function createGitHubAPI(repoMetadata: RepoMetaData, token: string, baseURL?: string): GitHubAPIClient; export declare function getPullRequestInfo(api: GitHubAPIClient): Promise; export declare function getPullRequestCommits(api: GitHubAPIClient): Promise; export declare function getPullRequestFiles(api: GitHubAPIClient): Promise; export declare function getPullRequestDiff(api: GitHubAPIClient): Promise; export declare function getReviews(api: GitHubAPIClient): Promise; export declare function getReviewerRequests(api: GitHubAPIClient): Promise; export declare function getIssue(api: GitHubAPIClient): Promise; export declare function getFileContents(api: GitHubAPIClient, path: string, repoSlug?: string, ref?: string): Promise; export declare function getPullRequestComments(api: GitHubAPIClient): Promise; export declare function getDangerCommentIDs(api: GitHubAPIClient, dangerID: string): Promise; export declare function postPRComment(api: GitHubAPIClient, body: string): Promise; export declare function updateCommentWithID(api: GitHubAPIClient, commentID: string, body: string): Promise; export declare function deleteCommentWithID(api: GitHubAPIClient, commentID: string): Promise; export declare function getPullRequestInlineComments(api: GitHubAPIClient, dangerID: string): Promise; export declare function postInlinePRComment(api: GitHubAPIClient, body: string, commitId: string, path: string, line: number): Promise; export declare function postInlinePRReview(api: GitHubAPIClient, commitId: string, comments: Array<{ body: string; path: string; line: number; }>): Promise; export declare function updateInlinePRComment(api: GitHubAPIClient, body: string, commentId: number): Promise; export declare function deleteInlineComment(api: GitHubAPIClient, commentId: number): Promise; export declare function updateStatus(api: GitHubAPIClient, passed: boolean | "pending", message: string, url?: string, dangerID?: string, commitHash?: string): Promise; //# sourceMappingURL=api.d.ts.map