UNPKG

pr-sizewise

Version:

A CLI tool that measures and reports pull request sizes for GitHub and GitLab, helping teams maintain manageable code changes.

45 lines 1.61 kB
import type { SizewiseConfig, AnalysisResult } from './types'; import { type VCSProviderConfig } from './providers'; /** * Platform-agnostic analyzer class that processes pull/merge requests and determines their size. */ export declare class UniversalSizeWiseAnalyzer { private provider; private config; private logger; constructor(config: SizewiseConfig, providerConfig: VCSProviderConfig); /** * Initialize the analyzer with provider configuration */ initialize(providerConfig: VCSProviderConfig): Promise<void>; /** * Create analyzer with auto-detected platform */ static createWithAutoDetect(config: SizewiseConfig, overrides?: Partial<VCSProviderConfig>): Promise<UniversalSizeWiseAnalyzer>; /** * Determines the size category of a pull request based on its metrics. */ private determineSize; /** * Retrieves and processes changes from a pull/merge request. */ private getPullRequestChanges; /** * Analyzes a pull/merge request and returns detailed metrics and size classification. */ analyzePullRequest(prId: string): Promise<AnalysisResult>; /** * Legacy method name for backward compatibility */ analyzeMergeRequest(mrId: string): Promise<AnalysisResult>; /** * Handles adding or updating PR/MR comments based on configuration */ private handlePullRequestComment; /** * Handles adding or updating PR/MR labels based on configuration */ private handlePullRequestLabels; private generateDetails; } //# sourceMappingURL=analyzer.d.ts.map