You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@caldera.apache.org by mp...@apache.org on 2026/07/23 21:58:29 UTC

(caldera) branch master updated: ci: skip SonarQube scan on Dependabot PR runs (#3403)

This is an automated email from the ASF dual-hosted git repository.

deacon-mp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/caldera.git


The following commit(s) were added to refs/heads/master by this push:
     new f129110a ci: skip SonarQube scan on Dependabot PR runs (#3403)
f129110a is described below

commit f129110ae9fd8847e3cff830633daa0f25b33af2
Author: deacon-mp <61...@users.noreply.github.com>
AuthorDate: Thu Jul 23 17:58:21 2026 -0400

    ci: skip SonarQube scan on Dependabot PR runs (#3403)
    
    Dependabot-authored pull_request runs receive no repository secrets, so
    SONAR_TOKEN is empty and the scan step can only fail (exit 3, 'Not
    authorized'), turning every Dependabot PR red regardless of test results.
    This began when the repository transfer dropped the Dependabot-scope
    secret; the Actions-scope secret still works, so pushes and human PRs
    are unaffected. Skip the scan for Dependabot runs; the merged result is
    still analyzed by the push-event run on master, and fork PRs already
    route through the trusted sonar-fork-pr.yml path.
    
    Co-authored-by: deacon-mp <mp...@mitre.org>
---
 .github/workflows/quality.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 80c4cafd..d88c31a0 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -59,7 +59,10 @@ jobs:
         run: tox
 
       - name: SonarQube Scan
-        if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) }}
+        # Dependabot-authored PR runs receive no repository secrets, so SONAR_TOKEN is
+        # empty and the scan can only fail; skip it there. The merged result is still
+        # scanned by the push-event run on master.
+        if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]') }}
         uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e  # v8.2.0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}