/** * GitHub Wave Metrics Aggregation * * Aggregates metrics from GitHub issues and pull requests for wave completion. * This is a stub implementation since we don't have GitHub API credentials in this environment. * * Future: Integrate with @octokit/rest when GitHub credentials are available. */ import type { WaveMetrics, WaveIssue } from "../memory/frames/wave-complete.js"; export interface GitHubIssue { ref: string; title: string; state: string; closedAt?: string; prRef?: string; } export interface GitHubPullRequest { ref: string; state: string; mergedAt?: string; additions: number; deletions: number; } /** * Aggregate metrics from GitHub issues and PRs for a wave * * @param epicRef - Epic issue reference (e.g., 'lexrunner#653') * @param waveId - Wave identifier (e.g., 'wave-2') * @returns Wave metrics * * @remarks * This is a stub implementation. In production, this would: * 1. Fetch issues from the epic (filtered by wave label) * 2. Fetch associated PRs for each issue * 3. Calculate metrics from PR diffs and test files * 4. Count test additions from test files */ export declare function aggregateWaveMetrics(_epicRef: string, _waveId: string): Promise; /** * Fetch issues for a wave from GitHub * * @param epicRef - Epic issue reference * @param waveId - Wave identifier * @returns Array of wave issues * * @remarks * Stub implementation. In production, this would: * 1. Parse epicRef to get owner/repo/issue_number * 2. Use GitHub API to fetch issues with wave label * 3. Map to WaveIssue format */ export declare function fetchWaveIssues(_epicRef: string, _waveId: string): Promise; /** * Calculate test count from PR changes * * @param prRef - Pull request reference * @returns Number of tests added * * @remarks * Stub implementation. In production, this would: * 1. Fetch PR file changes * 2. Filter for test files (*.test.ts, *.spec.ts, etc.) * 3. Count new test cases using AST parsing or regex patterns */ export declare function calculateTestsAdded(_prRef: string): Promise; /** * Suggest next wave based on epic backlog * * @param epicRef - Epic issue reference * @returns Array of suggested issue references * * @remarks * Stub implementation. In production, this would: * 1. Fetch remaining open issues from the epic * 2. Apply priority/dependency heuristics * 3. Return top N candidates for next wave */ export declare function suggestNextWave(_epicRef: string): Promise;