export type GitHubErrorCode = 'NOT_FOUND' | 'UNAUTHORIZED' | 'RATE_LIMITED' | 'NETWORK' | 'DECODE_ERROR'; export declare class GitHubApiError extends Error { code: GitHubErrorCode; retryAfter?: number | undefined; constructor(code: GitHubErrorCode, message: string, retryAfter?: number | undefined); } export interface GitHubCommit { sha: string; message: string; author: string; timestamp: string; files?: string[]; } export interface GitHubTreeEntry { path: string; type: 'file' | 'dir'; size?: number; } export interface GitHubIssue { number: number; title: string; state: 'open' | 'closed'; labels: string[]; milestone?: { number: number; title: string; }; body?: string; createdAt: string; } export interface GitHubMilestone { number: number; title: string; description?: string; state: 'open' | 'closed'; openIssues: number; closedIssues: number; dueOn?: string; } export interface GitHubClient { listCommits(owner: string, repo: string, opts?: { branch?: string; since?: string; limit?: number; }): Promise; getTree(owner: string, repo: string, opts?: { branch?: string; recursive?: boolean; }): Promise; getFileContent(owner: string, repo: string, path: string, opts?: { branch?: string; }): Promise; listIssues(owner: string, repo: string, opts?: { state?: 'open' | 'closed' | 'all'; labels?: string; milestone?: number; limit?: number; }): Promise; listMilestones(owner: string, repo: string, opts?: { state?: 'open' | 'closed' | 'all'; limit?: number; }): Promise; } /** Parse a GitHub URL into owner/repo components */ export declare function parseRepoUrl(url: string): { owner: string; repo: string; } | null; /** Create a GitHubClient. Token from parameter or GITHUB_TOKEN env var. */ export declare function createGitHubClient(token?: string): GitHubClient; //# sourceMappingURL=github.d.ts.map