Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Run SonarCloud audit
env:
ORG: ${{ github.repository_owner }}
SONAR_ORG: petry-projects
SONAR_ORG: ${{ github.repository_owner }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the legacy Sonar organization in the migration scan

When any repository is still registered only under petry-projectsβ€”the staged state described here, where this commit migrates .github after only the markets pilotβ€”this override makes the weekly fleet audit enumerate only combsmith. The same run then calls close_resolved for every GitHub repository, and close_resolved interprets every absent group as resolved, so it will close valid audit issues and stop reporting findings for repositories not yet moved. Scan both Sonar organizations, or disable closures, until the fleet migration is verified rather than switching the destructive audit in one step.

AGENTS.md reference: AGENTS.md:L419-L426

Useful? React with πŸ‘Β / πŸ‘Ž.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: added a CLOSE_RESOLVED switch (default true) in scripts/sonarcloud-audit.sh that skips close_resolved in main, and set CLOSE_RESOLVED: 'false' in .github/workflows/sonarcloud-audit.yml until the fleet migration is verified. Repos still only under petry-projects no longer get their audit issues auto-closed.

REPORT_DIR: ${{ runner.temp }}/sonarcloud-report
TARGET_REPO: ${{ inputs.target_repo || '' }}
DRY_RUN: ${{ inputs.dry_run || 'false' }}
Expand Down
4 changes: 2 additions & 2 deletions scripts/sonarcloud-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Env:
# ORG GitHub owner (default: combsmith)
# SONAR_ORG SonarCloud organization (default: petry-projects)
# SONAR_ORG SonarCloud organization (default: combsmith)
# SONAR_URL SonarCloud base URL (default: https://sonarcloud.io)
# SONAR_TOKEN optional; enables auth (private projects, higher rate limits)
# REPORT_DIR output dir (default: mktemp -d)
Expand All @@ -27,7 +27,7 @@
set -euo pipefail

ORG="${ORG:-combsmith}"
SONAR_ORG="${SONAR_ORG:-petry-projects}"
SONAR_ORG="${SONAR_ORG:-combsmith}"
SONAR_URL="${SONAR_URL:-https://sonarcloud.io}"
SONAR_AUDIT_LABEL="sonarcloud-audit"
DRY_RUN="${DRY_RUN:-false}"
Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=petry-projects_.github
sonar.organization=petry-projects
sonar.projectKey=combsmith_.github
sonar.organization=combsmith
sonar.python.coverage.reportPaths=test/feature-ideation/coverage.xml

# SonarCloud S7637 exemption for first-party reusable-ref caller stubs (#498).
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/compliance-audit/sonar-s7637-exemption.bats
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ classify() {
}

@test "no issue-ignore config at all is missing" {
classify "$(printf 'sonar.projectKey=petry-projects_foo\nsonar.organization=petry-projects\n')"
classify "$(printf 'sonar.projectKey=combsmith_foo\nsonar.organization=combsmith\n')"
[ "$status" -eq 0 ]
[ "$output" = "missing" ]
}
Expand Down
6 changes: 3 additions & 3 deletions test/scripts/sonarcloud-audit/pure-helpers.bats
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ call() {

# ── sonar_project_to_repo ──────────────────────────────────────────────────
@test "strips org prefix" {
call sonar_project_to_repo "petry-projects_markets"; [ "$output" = "markets" ]
call sonar_project_to_repo "combsmith_markets"; [ "$output" = "markets" ]
}
@test "broodminder-export2 key maps to the real repo broodminder-export" {
call sonar_project_to_repo "petry-projects_broodminder-export2"; [ "$output" = "broodminder-export" ]
call sonar_project_to_repo "combsmith_broodminder-export2"; [ "$output" = "broodminder-export" ]
}
@test "dotted repo name survives prefix strip" {
call sonar_project_to_repo "petry-projects_.github"; [ "$output" = ".github" ]
call sonar_project_to_repo "combsmith_.github"; [ "$output" = ".github" ]
}

# ── severity_rank ordering ─────────────────────────────────────────────────
Expand Down
Loading