devibe
Version:
Intelligent repository cleanup with auto mode, AI learning, markdown consolidation, auto-consolidate workflow, context-aware classification, and cost optimization
59 lines • 1.64 kB
TypeScript
/**
* GitIgnore Manager
*
* Automatically manages .gitignore files to exclude devibe directories
* (.devibe and .unvibe) from version control.
*
* Features:
* - Adds .devibe and .unvibe to .gitignore in all repositories
* - Creates .gitignore if it doesn't exist
* - Avoids duplicate entries
* - Preserves existing .gitignore content
* - Works with both root and sub-repositories
*/
import type { GitRepository } from './types.js';
export interface GitIgnoreUpdateResult {
updated: string[];
created: string[];
skipped: string[];
errors: Array<{
path: string;
error: string;
}>;
}
export declare class GitIgnoreManager {
private readonly entriesToAdd;
/**
* Update .gitignore files in all repositories
*/
updateAllRepositories(repositories: GitRepository[]): Promise<GitIgnoreUpdateResult>;
/**
* Update a single .gitignore file
*/
updateGitIgnore(gitignorePath: string): Promise<'created' | 'updated' | 'skipped'>;
/**
* Create a new .gitignore file with devibe entries
*/
private createGitIgnore;
/**
* Generate .gitignore content with devibe entries
*/
private generateGitIgnoreContent;
/**
* Add entries to existing .gitignore content
*/
private addEntries;
/**
* Check if an entry exists in .gitignore
*/
private hasEntry;
/**
* Check if a file exists
*/
private fileExists;
/**
* Get a summary message for the update result
*/
static formatResult(result: GitIgnoreUpdateResult): string;
}
//# sourceMappingURL=gitignore-manager.d.ts.map