Skip to content

SCANNPM-133 feat: Automatically create Update Center PR on release#400

Merged
vdiez merged 15 commits intomasterfrom
feat/auto-update-center-pr
Jan 27, 2026
Merged

SCANNPM-133 feat: Automatically create Update Center PR on release#400
vdiez merged 15 commits intomasterfrom
feat/auto-update-center-pr

Conversation

@vdiez
Copy link
Contributor

@vdiez vdiez commented Jan 23, 2026

Summary

  • Add validation for required Description: line in release body (fails fast if missing)
  • Add release_description input for manual workflow dispatch
  • Create PR in sonar-update-center-properties after publish
  • Request review from @SonarSource/quality-web-squad
  • Update docs with new release process

Changes

Release workflow

  • New validation step that extracts Description: from release body
  • New update-center job that creates PR in sonar-update-center-properties
  • New release_description input for manual dry runs

Documentation

  • Updated release process to include Description: requirement
  • Updated dry run instructions with new input
  • Updated Sonar Update Center section to reflect automation

Test plan

  • Run workflow with dry run to verify Update Center PR is created correctly
  • Verify PR is created with correct content in sonar-update-center-properties
  • Close test PR after verification

🤖 Generated with Claude Code

- Add validation for required `Description:` line in release body
- Add `release_description` input for manual workflow dispatch
- Create PR in sonar-update-center-properties after publish
- Request review from @SonarSource/quality-web-squad
- Update docs with new release process

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title feat: Automatically create Update Center PR on release SCANNPM-133 feat: Automatically create Update Center PR on release Jan 23, 2026
@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Jan 23, 2026

SCANNPM-133

@vdiez vdiez requested a review from zglicz January 23, 2026 15:08
Copy link
Contributor

@zglicz zglicz left a comment

Choose a reason for hiding this comment

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

Please add a release template so that the Description: field exists in the notes of the release.

vdiez and others added 11 commits January 26, 2026 20:13
Address review feedback to ensure Description: field is pre-populated
when creating releases.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The vault secret was configured in re-terraform-aws-vault#8403 with
the suffix 'release-automation', not 'update-center'.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The GitHub token doesn't have permission to access organization teams,
which is required for the --reviewer flag. CODEOWNERS should handle
review assignment automatically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Notify squad-analysis-experience channel when a new version is released
with links to the release, npm package, and Update Center PR.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Split notify into separate job for better separation of concerns
- Add slack_channel input parameter with default value
- Fetch Slack webhook in dedicated job
- Include Update Center PR link in notification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Incoming webhooks have a fixed channel, so the channel parameter was
ignored. Switch to using the Slack bot token with chat.postMessage
method which allows specifying the target channel.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Set errors: true so failed Slack API calls will fail the step
and show the actual error message.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Private channels require using the channel ID (C03DLUN6GR3) instead
of the channel name.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move the sed/awk logic for updating scannernpm.properties to a
dedicated script at scripts/update-update-center.sh. This makes
the logic easier to understand, maintain, and test locally.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vdiez vdiez requested a review from zglicz January 26, 2026 20:54
vdiez and others added 3 commits January 27, 2026 10:48
The qa-deployer token does not have read access to download the
SonarQube application zip from repox. This caused CI failures when
SonarQube 26.2.0 was released and the tests tried to download it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Artifactory now serves 302 redirects instead of direct file streams.
Node.js https.get doesn't follow redirects by default, causing the
redirect HTML/JSON to be saved as the zip file.

This fix:
- Follows HTTP 3xx redirects automatically
- Validates HTTP status codes before saving the response
- Provides clear error messages for authentication failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the manual steps required after the release workflow:
1. Merge the Update Center PR
2. Run the deploy workflow to publish the JSON
3. Run the generate-release-notes workflow and merge the docs PR

Also update the Slack notification to include these steps as a checklist.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud
Copy link

SonarQube reviewer guide

Important

We are currently testing different models for AI Summary.
Please give us your feedback by filling this form.

Model A:

Summary: Automates Update Center registration and adds Slack notifications to the release workflow.

Review Focus:

  • Release description validation logic and its extraction from release bodies
  • Update Center automation (PR creation, property file updates)
  • Redirect handling in the download utility to fix Artifactory access issues
  • Artifactory token consolidation (removed duplicate qa-deployer token)

Start review at: .github/workflows/release.yml. This is the core of the PR with the most significant changes—it introduces three new jobs (validation, update-center automation, and notifications) that fundamentally change the release process from manual to automated.

Model B:

Summary: Automate the Sonar Update Center release process with release description validation, update-center PR creation, and Slack notifications.

Review Focus:

  • The new update-center and notify jobs in release.yml that handle automated Update Center updates and notifications
  • The release description validation logic and how it extracts/validates the Description: field from release bodies
  • The update-update-center.sh script that modifies the properties file—ensure it correctly handles version archival and entry formatting
  • The download redirect handling in download.ts—verify the recursive redirect logic doesn't cause infinite loops

Start review at: .github/workflows/release.yml. This is the core orchestration file where the release workflow logic resides. Review the new update-center job (lines 152+) to understand the full automated flow, then trace through the supporting script and validation steps.

Review in SonarQube
See all code changes, issues, and quality metrics in one place.

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues
0 Dependency risks

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@vdiez vdiez merged commit 8707dcd into master Jan 27, 2026
9 checks passed
@vdiez vdiez deleted the feat/auto-update-center-pr branch January 27, 2026 10:21
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.

2 participants