From 2ac5736dd0f0d46510aaf4f4397fe846c5f37215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vit=C3=B3rio=20A=2E=20Cavalheiro?= Date: Fri, 10 Oct 2025 13:02:35 -0300 Subject: [PATCH] fix(ci): prevent deletion of protected branches in delete-branch workflow Add condition to skip branch deletion for protected branches like development, main, and master. --- .github/workflows/delete-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/delete-branch.yml b/.github/workflows/delete-branch.yml index 842424c..c9d54e8 100644 --- a/.github/workflows/delete-branch.yml +++ b/.github/workflows/delete-branch.yml @@ -9,7 +9,7 @@ permissions: jobs: delete-branch: - if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true && !contains(fromJSON('["development", "main", "master"]'), github.head_ref) runs-on: ubuntu-latest steps: - name: Delete merged branch