From 2d2727cf438e3bfe05f717b1af66f3bbef1d4192 Mon Sep 17 00:00:00 2001 From: Lilith Date: Sun, 11 Jan 2026 01:50:51 -0800 Subject: [PATCH] =?UTF-8?q?feat(@ml/auto-commit-service):=20=E2=9C=A8=20ad?= =?UTF-8?q?d=20discovery=20and=20scheduler=20features?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auto_commit_service/git/discovery.py | 12 ++++++++++-- src/auto_commit_service/scheduler/daemon.py | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/auto_commit_service/git/discovery.py b/src/auto_commit_service/git/discovery.py index 12239f8..45eadd7 100644 --- a/src/auto_commit_service/git/discovery.py +++ b/src/auto_commit_service/git/discovery.py @@ -11,6 +11,7 @@ def discover_git_repos( base_path: Path, max_depth: int | None = None, exclude_patterns: list[str] | None = None, + ignore_repos: list[str] | None = None, ) -> list[Path]: """Recursively find all .git directories. @@ -18,12 +19,14 @@ def discover_git_repos( base_path: Root directory to search max_depth: Maximum recursion depth (None = unlimited) exclude_patterns: Directory names to skip (e.g., node_modules, .venv) + ignore_repos: Repository names to ignore (exclude from results) Returns: List of repository root paths (parent of .git directory) """ repos: list[Path] = [] exclude_set = set(exclude_patterns or []) + ignore_set = set(ignore_repos or []) logger.info( f"Discovering git repos in {base_path} (max_depth={max_depth}, " @@ -62,8 +65,13 @@ def discover_git_repos( # Validate it's a directory, not a file (gitlinks/submodules use .git file) git_path = root_path / ".git" if git_path.is_dir() and not should_exclude(root_path): - repos.append(root_path) - logger.debug(f"Found repo: {root_path}") + # Check if repo name is in ignore list + repo_name = root_path.name + if repo_name not in ignore_set: + repos.append(root_path) + logger.debug(f"Found repo: {root_path}") + else: + logger.debug(f"Ignoring repo: {root_path}") # Don't descend into .git (may already be removed by depth limit) if ".git" in dirs: diff --git a/src/auto_commit_service/scheduler/daemon.py b/src/auto_commit_service/scheduler/daemon.py index 7886387..8e78ef5 100644 --- a/src/auto_commit_service/scheduler/daemon.py +++ b/src/auto_commit_service/scheduler/daemon.py @@ -141,6 +141,7 @@ class CommitDaemon: base_path=base_path, max_depth=self.settings.recursive_depth, exclude_patterns=self.settings.exclude_patterns, + ignore_repos=self.settings.ignore_repos, ) for path in repo_paths: if path not in path_to_base: