@zubenelakrab/gitstats
Version:
Powerful Git repository analyzer with comprehensive statistics and insights
64 lines • 1.82 kB
TypeScript
import type { Commit, AnalysisConfig, Analyzer } from '../types/index.js';
export interface CommitQualityStats {
averageMessageLength: number;
shortMessages: number;
longMessages: number;
conventionalCommits: number;
conventionalPercentage: number;
commitTypes: Record<string, number>;
wipCommits: WipCommit[];
fixCommits: number;
fixPercentage: number;
averageFilesPerCommit: number;
largeCommits: LargeCommit[];
atomicCommitScore: number;
shotgunCommits: ShotgunCommit[];
qualityScore: number;
authorBreakdown: AuthorTypeBreakdown[];
typeEvolution: TypeEvolutionEntry[];
}
export interface WipCommit {
hash: string;
message: string;
author: string;
date: Date;
}
export interface LargeCommit {
hash: string;
message: string;
filesChanged: number;
additions: number;
deletions: number;
author: string;
}
export interface ShotgunCommit {
hash: string;
message: string;
directories: string[];
filesChanged: number;
reason: string;
}
export interface AuthorTypeBreakdown {
author: string;
email: string;
totalCommits: number;
types: Record<string, number>;
primaryType: string;
diversityScore: number;
}
export interface TypeEvolutionEntry {
month: string;
types: Record<string, number>;
totalCommits: number;
dominantType: string;
}
export declare class CommitQualityAnalyzer implements Analyzer<CommitQualityStats> {
name: string;
description: string;
analyze(commits: Commit[], _config: AnalysisConfig): Promise<CommitQualityStats>;
private calculateQualityScore;
private detectCommitType;
private emptyStats;
}
export declare function createCommitQualityAnalyzer(): CommitQualityAnalyzer;
//# sourceMappingURL=commits-analyzer.d.ts.map