From 5a9656350ed34ed35242e38ce81649df357a5627 Mon Sep 17 00:00:00 2001 From: David Langley Date: Wed, 3 Dec 2025 18:38:58 +0000 Subject: [PATCH] Add Z-Skip-Sonar check (#31409) * Try fetch PR from the workflow run to check the label and skip sonar * Use existing pattern to post success for the sonarqube check * Trigger Build --- .github/labels.yml | 3 +++ .github/workflows/tests.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/labels.yml b/.github/labels.yml index f8adbe8e53..3d7b1a5b22 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -279,3 +279,6 @@ - name: "Z-Flaky-Test-Disabled" description: "The flaking test has been disabled" color: "ededed" +- name: "Z-Skip-Sonar" + description: "Skip SonarQube analysis for this PR" + color: "ededed" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30ddc35398..04a92e44fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -103,7 +103,7 @@ jobs: run: exit 1 - name: Skip SonarCloud in merge queue - if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true' + if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true' || contains(github.event.pull_request.labels.*.name, 'Z-Skip-Sonar') uses: guibranco/github-status-action-v2@5530c593759f489bba08272e96986ffc571c1ea1 with: authToken: ${{ secrets.GITHUB_TOKEN }}