From a442dcfbaad40cd83aaa941de3b5f1893514f6f9 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 3 Jul 2026 11:13:39 +0000 Subject: [PATCH] =?UTF-8?q?Renamer=20discovers=20=5FSero=20Batch=20roots?= =?UTF-8?q?=20under=20Property=20Folders=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- orchestration/sharepoint_renamer_orchestrator.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/orchestration/sharepoint_renamer_orchestrator.py b/orchestration/sharepoint_renamer_orchestrator.py index 15917f0a2..3159a607b 100644 --- a/orchestration/sharepoint_renamer_orchestrator.py +++ b/orchestration/sharepoint_renamer_orchestrator.py @@ -67,7 +67,14 @@ class SharepointRenamerOrchestrator: self._dry_run = dry_run def _discover_roots(self) -> list[str]: - raise NotImplementedError + contents = self._sp_client.get_folders_in_path(BASE_PATH) + batch_roots = sorted( + f"{BASE_PATH}/{item['name']}" + for item in contents.get("value", []) + if "folder" in item + and item["name"].lower().startswith(BATCH_FOLDER_PREFIX.lower()) + ) + return [BASE_PATH, *batch_roots] def run(self) -> None: with open(self._csv_path, newline="", encoding="utf-8-sig") as f: