@elsikora/commitizen-plugin-commitlint-ai
Version:
AI-powered Commitizen adapter with Commitlint integration
48 lines (47 loc) • 1.57 kB
TypeScript
import type { CommitBody } from '../value-object/commit-body.value-object';
import type { CommitHeader } from '../value-object/commit-header.value-object';
/**
* Entity representing a complete commit message
*/
export declare class CommitMessage {
private readonly BODY;
private readonly HEADER;
constructor(header: CommitHeader, body: CommitBody);
/**
* Get the commit body
* @returns {CommitBody} The commit body
*/
getBody(): CommitBody;
/**
* Get breaking change text if present
* @returns {string | undefined} The breaking change text or undefined
*/
getBreakingChange(): string | undefined;
/**
* Get the commit header
* @returns {CommitHeader} The commit header
*/
getHeader(): CommitHeader;
/**
* Check if this is a breaking change
* @returns {boolean} True if breaking change
*/
isBreakingChange(): boolean;
/**
* Format the complete commit message
* @returns {string} The formatted commit message
*/
toString(): string;
/**
* Create a new CommitMessage with a different body
* @param {CommitBody} body - The new body
* @returns {CommitMessage} A new CommitMessage instance with the updated body
*/
withBody(body: CommitBody): CommitMessage;
/**
* Create a new CommitMessage with a different header
* @param {CommitHeader} header - The new header
* @returns {CommitMessage} A new CommitMessage instance with the updated header
*/
withHeader(header: CommitHeader): CommitMessage;
}