Skip to content

Commit 2299a7b

Browse files
committed
feat(cli): integrate project detection in commit handler
- Added ProjectDetector to identify project boundaries - Initialized fileGrouper with detected boundaries - Enhanced commit handling with new project detection logic
1 parent 1841047 commit 2299a7b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cli/commit-handler.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { CommitaConfig } from '@/config/config.types.ts';
33
import { FileGrouper } from '@/git/file-grouper.ts';
44
import type { FileChange } from '@/git/git.service.ts';
55
import { GitService } from '@/git/git.service.ts';
6+
import { ProjectDetector } from '@/git/project-detector.ts';
67
import { PatternMatcher } from '@/utils/pattern-matcher.ts';
78
import chalk from 'chalk';
89

@@ -31,6 +32,9 @@ export class CommitHandler {
3132

3233
await this.gitService.init();
3334

35+
const boundaries = ProjectDetector.detect(this.gitService.getRootDir());
36+
this.fileGrouper = new FileGrouper(boundaries);
37+
3438
const patternMatcher = new PatternMatcher(
3539
PatternMatcher.parsePatterns(options.ignore)
3640
);

0 commit comments

Comments
 (0)