Skip to content

Commit b8eac35

Browse files
committed
fix: prevent root module from appearing in affected modules list
Never return root module (.) from _find_module_for_file to prevent full project builds via Maven's -amd flag. Signed-off-by: Mark Pollack <[email protected]>
1 parent b767954 commit b8eac35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/scripts/test_discovery.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ def _find_module_for_file(self, file_path: str) -> Optional[str]:
131131
pom_path = self.repo_root / potential_module / "pom.xml"
132132

133133
if pom_path.exists():
134+
# Never return root module to prevent full builds
135+
if potential_module == ".":
136+
return None
134137
# Found a module - return the relative path from repo root
135138
return potential_module
136139

137-
# Check if it's in the root module
138-
if (self.repo_root / "pom.xml").exists():
139-
return "."
140-
140+
# Never return root module to prevent full builds
141141
return None
142142

143143
def _is_relevant_file(self, file_path: str) -> bool:

0 commit comments

Comments
 (0)