BUILD-10590 Add verified-approvals required workflow#227
Closed
julien-carsique-sonarsource wants to merge 5 commits intomasterfrom
Closed
BUILD-10590 Add verified-approvals required workflow#227julien-carsique-sonarsource wants to merge 5 commits intomasterfrom
julien-carsique-sonarsource wants to merge 5 commits intomasterfrom
Conversation
cc45fdf to
2c501ec
Compare
Checks PR approvals to enforce the SonarSource org ruleset:
- 1 approval required for internal PRs
- 2 approvals required for external (fork) PRs
Triggers on pull_request and pull_request_review (submitted/dismissed) events.
Skips approval check for merge_group events (always pass).
Considers a PR as external if it contains commits from non-org members
(in addition to the fork check); bot accounts are excluded.
Uses committer login (who pushed) instead of declared author (which can be faked).
Uses a dedicated {REPO_OWNER_NAME_DASH}-approvals vault token (members:read)
for all org membership checks (commit committers and PR approvers).
2c501ec to
44e3f66
Compare
This was referenced Mar 5, 2026
Merged
…nal contribution detection Bot accounts (type Bot) remain excluded and treated as internal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SonarQube reviewer guideSummary: Adds GitHub Actions workflows to enforce verified approvals on pull requests, requiring 2 approvals for external contributions and 1 for internal PRs. Review Focus: Pay close attention to the approval verification logic in
Start review at:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
github/verified-approvals.ymlas a required workflow for the SonarSource org ruleset #4485920pull_request(opened, synchronize, reopened, ready_for_review) andpull_request_review(submitted, dismissed) eventsDepends on
Test plan
SonarSource/ci-github-actions@master:github/verified-approvals.ymlverified-approvalscheck appears and behaves correctly for both internal and external PRsTested with: