fix(ci): handle empty changed-file lists

Use a Git diff fallback when Woodpecker provides no changed-file list.

Co-authored-by: JustMe <mr.toing@outlook.com>
This commit is contained in:
justme authored and justme committed 2026-10-05 17:27:35 +00:00
1 parent dcf096431d
commit d6b919bc42
1 file changed
+3 -1
+3 -1
View File
@@ -39,7 +39,9 @@ def read_changed_files() -> list[str]:
try:
value = json.loads(raw)
if isinstance(value, list):
return [str(path).replace("\\", "/") for path in value]
changed = [str(path).replace("\\", "/") for path in value]
if changed:
return changed
except json.JSONDecodeError:
return [path.strip().replace("\\", "/") for path in raw.split(",") if path.strip()]