@elsikora/commitizen-plugin-commitlint-ai
Version:
AI-powered Commitizen adapter with Commitlint integration
20 lines • 919 B
TypeScript
import type { CommitConfig, LLMPromptContext } from "./llm";
interface ValidationResult {
errors?: string;
isValid: boolean;
}
/**
* Validates a commit message and retries with LLM if there are errors
* @param commitConfig The original commit configuration
* @param promptContext The prompt context used to generate the commit
* @returns A promise that resolves to a valid commit message or null if manual entry is needed
*/
export declare function validateAndFixCommitMessage(commitConfig: CommitConfig, promptContext: LLMPromptContext): Promise<null | string>;
/**
* Validates a commit message with commitlint
* @param commitMessage The commit message to validate
* @returns A promise that resolves to an object with the validation result
*/
export declare function validateWithCommitlint(commitMessage: string): Promise<ValidationResult>;
export {};
//# sourceMappingURL=commitlintValidator.d.ts.map