From 54b84ac91649bfab21cad2a72dca7eb93fc9b664 Mon Sep 17 00:00:00 2001 From: Mary Georgiou Date: Wed, 30 Sep 2026 13:30:11 +0200 Subject: [PATCH 1/2] CLP-1044: Use the shared slack-notify action Adds a notify-build-failure job to build.yml that reports pipeline failures on protected branches via the shared SonarSource/core-languages-tooling-public/common-actions/slack-notify action, replacing the stale check_suite-based approach with an in-workflow job as required by the action's current interface. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7eb05de8a26..4a36cb35789 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -422,3 +422,31 @@ jobs: - uses: SonarSource/ci-github-actions/promote@v1 with: promote-pull-request: true + + notify-build-failure: + name: Notify Build Failure + needs: + - build + - ruling-qa + - plugin-qa + - sanity + - test-analyze + - custom-rules-license-check + - qa-os-win + - promote + if: >- + always() + && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/branch-') || startsWith(github.ref, 'refs/heads/dogfood-')) + && contains(needs.*.result, 'failure') + runs-on: sonar-xs-public + permissions: + actions: read # lets the action list this run's own jobs via the GitHub API + id-token: write # required for vault-action-wrapper in the shared slack-notify action + steps: + - name: Slack Notification + uses: SonarSource/core-languages-tooling-public/common-actions/slack-notify@v1 + with: + slack-channel: squad-corelang-notifs + branch-patterns: 'master,branch-*,dogfood-*' + github-token: ${{ github.token }} + branch: ${{ github.ref_name }} From b9766cd80c77b30f6d7d60ee2f1b8b9567f47b0b Mon Sep 17 00:00:00 2001 From: Mary Georgiou Date: Wed, 30 Sep 2026 14:27:17 +0200 Subject: [PATCH 2/2] Use github.event.repository.default_branch instead of hardcoded master Co-Authored-By: Claude Sonnet 5 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a36cb35789..66e254f22cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -447,6 +447,6 @@ jobs: uses: SonarSource/core-languages-tooling-public/common-actions/slack-notify@v1 with: slack-channel: squad-corelang-notifs - branch-patterns: 'master,branch-*,dogfood-*' + branch-patterns: ${{ format('{0},branch-*,dogfood-*', github.event.repository.default_branch) }} github-token: ${{ github.token }} branch: ${{ github.ref_name }}