Skip to content

GHA-146 Add rspec-branch input to update-rule-metadata action - #63

Merged
nils-werner-sonarsource merged 2 commits into
masterfrom
nw/update-rule-metadata-from-branch
Nov 24, 2025
Merged

nils-werner-sonarsource merged 2 commits into
masterfrom
nw/update-rule-metadata-from-branch

Conversation

@nils-werner-sonarsource

Copy link
Copy Markdown
Contributor

This pull request adds support for specifying a custom branch of the rspec repository when running the rule metadata update workflow. This allows users to generate rule metadata from a specific rspec branch instead of always using the default master branch.

Feature Addition:

  • Added a new input parameter rspec-branch to both update-rule-metadata/action.yml and update-rule-metadata/README.md, allowing users to specify which rspec branch to use for rule metadata generation. [1] [2]
  • Updated the workflow logic in update-rule-metadata/action.yml to run rule-api generate with the specified branch if rspec-branch is set and not master; otherwise, it runs the default rule-api update.

Documentation Updates:

  • Provided documentation and usage examples for the new rspec-branch input in update-rule-metadata/README.md, including a sample workflow configuration.

PoC: https://github.com/SonarSource/sonar-php/actions/runs/19542007052

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Add rspec-branch input to update-rule-metadata action GHA-146 Add rspec-branch input to update-rule-metadata action Nov 20, 2025
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Nov 20, 2025 •

Copy link
Copy Markdown

GHA-146

@sonarqubecloud

Copy link
Copy Markdown

SonarQube reviewer guide

Summary: Add rspec-branch parameter to allow updating rule metadata from specific rspec repository branches.

Review Focus: Logic that conditionally switches between rule-api update and rule-api generate commands based on branch parameter. Verify the branch comparison logic handles edge cases correctly.

Start review at: update-rule-metadata/action.yml lines 141-150. This contains the core logic change that determines which rule-api command to execute based on the new parameter.

💬 Please send your feedback

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarQube Cloud

@nils-werner-sonarsource
nils-werner-sonarsource merged commit df9d4e1 into master Nov 24, 2025
10 checks passed
@nils-werner-sonarsource
nils-werner-sonarsource deleted the nw/update-rule-metadata-from-branch branch November 24, 2025 09:08
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