[ci] Fix non-component files incorrectly detected as components (#11701)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-11-04 16:47:11 +13:00
1 parent 4d2f9db861
commit 980098ca77
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -101,7 +101,11 @@ def get_component_from_path(file_path: str) -> str | None:
):
parts = file_path.split("/")
if len(parts) >= 3 and parts[2]:
return parts[2]
# Verify that parts[2] is actually a component directory, not a file
# like .gitignore or README.md in the components directory itself
component_name = parts[2]
if "." not in component_name:
return component_name
return None