/**
* GitHub HTML Scraper
*
* Parses GitHub pages to extract content without requiring authentication.
* Handles:
* - Single issues: /owner/repo/issues/123
* - Issue lists: /owner/repo/issues
* - File blobs: /owner/repo/blob/branch/path
* - README pages: /owner/repo (extracts readme)
*/
export interface GitHubIssue {
number: number;
title: string;
body: string;
state: 'open' | 'closed';
labels: string[];
author: string;
createdAt: string;
comments: GitHubComment[];
}
export interface GitHubComment {
author: string;
body: string;
createdAt: string;
}
export interface GitHubFile {
path: string;
content: string;
language?: string;
}
/**
* Detect if a URL is a GitHub URL and what type
*/
export declare function detectGitHubUrl(url: URL): {
type: 'issue' | 'issues' | 'blob' | 'repo' | 'raw' | null;
match: RegExpMatchArray | null;
};
/**
* Parse a single GitHub issue page
*/
export declare function parseGitHubIssue(html: string, issueNumber: number): GitHubIssue;
/**
* Parse GitHub issue list page
*/
export declare function parseGitHubIssueList(html: string, _owner: string, _repo: string): {
issues: Partial[];
hasMore: boolean;
};
/**
* Parse GitHub file blob page
*/
export declare function parseGitHubBlob(html: string, filepath: string): GitHubFile;
/**
* Convert a GitHub issue to markdown
*/
export declare function issueToMarkdown(issue: GitHubIssue): string;
/**
* Convert a GitHub file to markdown
*/
export declare function fileToMarkdown(file: GitHubFile): string;
/**
* Convert issue list to markdown
*/
export declare function issueListToMarkdown(issues: Partial[], owner: string, repo: string): string;
//# sourceMappingURL=github-scraper.d.ts.map