UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

52 lines (51 loc) 1.32 kB
/** * @fileoverview CI/CD data collector utility. * * This module collects CI/CD data (type check errors, lint errors) to include * in code reviews. It supports both project-wide and per-file analysis. */ /** * CI data structure */ export interface CIData { /** * Number of type check errors */ typeCheckErrors?: number; /** * Number of lint errors */ lintErrors?: number; /** * Raw type check output */ typeCheckOutput?: string; /** * Raw lint output */ lintOutput?: string; /** * Per-file error counts */ fileErrors?: { [filePath: string]: { typeCheckErrors: number; lintErrors: number; typeCheckMessages?: string[]; lintMessages?: string[]; }; }; } /** * Collect CI/CD data for the current project * @param projectPath Path to the project root * @returns Promise resolving to CI data */ export declare function collectCIData(projectPath: string): Promise<CIData>; /** * Format CI data for inclusion in prompts * @param ciData CI data to format * @param specificFile Optional specific file to focus on * @returns Formatted string for prompt inclusion */ export declare function formatCIDataForPrompt(ciData: CIData, specificFile?: string): string;