From 443dc01b4ea54befa4942e685b72dd16693ac33a Mon Sep 17 00:00:00 2001 From: emil Date: Tue, 7 Jul 2026 12:03:51 +0000 Subject: [PATCH] DEVX-120: fix: preserve .badges/ dir during git clean in push_badges --- src/devx/ci/push_badges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devx/ci/push_badges.py b/src/devx/ci/push_badges.py index 1cb8205..e2d3d9b 100644 --- a/src/devx/ci/push_badges.py +++ b/src/devx/ci/push_badges.py @@ -93,8 +93,8 @@ def push_to_badges_branch(badges_dir: str) -> str: _run(["git", "config", "user.email", "actions@oblachno.fyi"]) # nosec B607 _run(["git", "checkout", "--orphan", "badges"]) # nosec B607 _run(["git", "rm", "-rf", "."]) # nosec B607 - # Remove untracked files/dirs left behind (e.g. .badges/ from generate_badges) - _run(["git", "clean", "-fdx", "-e", ".git"]) # nosec B607 + # Remove untracked files/dirs left behind, but preserve .badges/ for copy below + _run(["git", "clean", "-fdx", "-e", ".git", "-e", badges_dir]) # nosec B607 # Copy badge files to root for svg in Path(badges_dir).glob("*.svg"):