Skip to content

feat(workflow): implement SonarCloud token verification that skips analysis for forks and provides SONAR_TOKEN setup instructions #5116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

alionazherdetska
Copy link
Contributor

@alionazherdetska alionazherdetska commented Mar 28, 2025

📄 Description

This PR implements handling of SonarCloud analysis in forked repositories by:

  • Adding automatic SONAR_TOKEN availability check in workflow
  • Implementing skip mechanism for forks without token (preventing test failing)
  • Adding clear contributor instructions for token setup

🚀 Demo

If applicable, please add a screenshot or video to illustrate the changes.


📝 Checklist

  • ✅ My code follows the style guidelines of this project
  • 🛠️ I have performed a self-review of my own code
  • 📄 I have made corresponding changes to the documentation
  • ⚠️ My changes generate no new warnings or errors
  • 🧪 I have added tests that prove my fix is effective or that my feature works
  • ✔️ New and existing unit tests pass locally with my changes

…alysis for forks, provides setup instructions, and creates neutral status checks when SONAR_TOKEN is missing
@alionazherdetska alionazherdetska requested a review from a team as a code owner March 28, 2025 15:15
@alionazherdetska alionazherdetska linked an issue Mar 28, 2025 that may be closed by this pull request
Copy link

changeset-bot bot commented Mar 28, 2025

⚠️ No Changeset found

Latest commit: 9338453

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@alionazherdetska alionazherdetska changed the title feat(workflow): implement SonarCloud token verification that skips analysis for forks and provides setup instructions feat(workflow): implement SonarCloud token verification that skips analysis for forks and provides SONAR_TOKEN setup instructions Mar 28, 2025
@leagrdv leagrdv requested a review from gfellerph April 8, 2025 09:34
@leagrdv
Copy link
Contributor

leagrdv commented Apr 8, 2025

@gfellerph I assigned you the PR as I'm not familiar with sonar

@leagrdv leagrdv removed their request for review April 8, 2025 09:51
@alionazherdetska alionazherdetska merged commit f0a6178 into main Apr 16, 2025
10 checks passed
@alionazherdetska alionazherdetska deleted the 4208-bug-sonarscanner-cli-execution-fails-for-forked-prs branch April 16, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: SonarScanner CLI Execution Fails for Forked PRs
3 participants