import type { GitForgeConfig } from "./types.js"; import { GitHubAppClient } from "./github-app.js"; export interface PullRequestOpts { owner: string; repo: string; title: string; head: string; base: string; body?: string; } export interface PullRequestResult { prUrl: string; prNumber: number; } export interface PushFileOpts { owner: string; repo: string; path: string; content: string; message: string; branch?: string; } export interface RepoInfo { owner: string; name: string; fullName: string; defaultBranch: string; private: boolean; } /** * Pluggable interface for interacting with Git forges (GitHub, GitLab, etc.). */ export interface GitForge { createPR(opts: PullRequestOpts): Promise; readFile(opts: { owner: string; repo: string; path: string; ref?: string; }): Promise; pushFile(opts: PushFileOpts): Promise; listRepos(owner: string): Promise; } /** * GitHub implementation of the GitForge interface. * Wraps GitHubAppClient for repository operations. */ export declare class GitHubForge implements GitForge { private readonly client; private readonly installationId; constructor(client: GitHubAppClient, installationId: number); createPR(opts: PullRequestOpts): Promise; readFile(opts: { owner: string; repo: string; path: string; ref?: string; }): Promise; pushFile(opts: PushFileOpts): Promise; listRepos(owner: string): Promise; } /** * Create a GitForge instance from a configuration object. * Currently only supports GitHub. */ export declare function createForge(config: GitForgeConfig): GitForge; //# sourceMappingURL=forge-interface.d.ts.map