import type { DiscoveredPR, ParsedPRDiff } from '../learned-rules/types.js'; /** Default labels that indicate a bug-fix PR. Matched case-insensitively as substrings. */ export declare const DEFAULT_BUG_LABELS: readonly string[]; /** * Returns true if any label in the array contains a bug-related keyword. * Matches case-insensitively. Accepts optional custom bug label list. */ export declare function matchesBugLabels(labels: string[], bugLabels?: readonly string[]): boolean; /** * Returns true if the PR title matches common bug-fix prefixes. * Looks for fix/bug/resolve/patch at the start or after a conventional commit prefix. */ export declare function matchesBugTitle(title: string): boolean; /** * Returns true if the file path is a minable source file (JS/TS, Python, * Go, Java/Kotlin, Ruby, PHP, or Rust) that is NOT a test file or * declaration file. */ export declare function isTargetFile(path: string): boolean; interface DiscoveryConfig { /** Max PRs to fetch per page (GitHub max: 100). */ readonly perPage?: number; /** Max pages to paginate through. */ readonly maxPages?: number; /** Custom bug labels to match. Defaults to DEFAULT_BUG_LABELS. */ readonly bugLabels?: readonly string[]; /** Whether to fall back to title matching if no labels match. */ readonly titleFallback?: boolean; /** Whether to fetch review comments for each PR. */ readonly fetchComments?: boolean; } /** * Discover merged bug-fix PRs from a GitHub repo. * * Flow: * 1. Fetch closed PRs (paginated) * 2. Filter to merged-only (merged_at !== null) * 3. Filter by bug labels (with optional title fallback) * 4. Optionally enrich with review comments * 5. Collect changed file paths */ export declare function discoverBugFixPRs(owner: string, name: string, config?: DiscoveryConfig): DiscoveredPR[]; /** * Fetch and parse diffs for a discovered PR. * * Calls the files endpoint, filters to target files, * and parses each file's patch into typed DiffHunks. */ export declare function fetchPRDiffs(owner: string, name: string, pr: DiscoveredPR): ParsedPRDiff; export {};