Skip to content

GHA-169 Normalize Jira version names by removing .0 patch suffix#79

Merged
nils-werner-sonarsource merged 1 commit intomasterfrom
normalize-jira-version-name
Jan 27, 2026
Merged

GHA-169 Normalize Jira version names by removing .0 patch suffix#79
nils-werner-sonarsource merged 1 commit intomasterfrom
normalize-jira-version-name

Conversation

@nils-werner-sonarsource
Copy link
Contributor

Versions ending in .0 (e.g., 1.2.0) are now automatically shortened to their minor version (e.g., 1.2) to maintain consistency in Jira. Non-zero patches like 1.2.4 remain unchanged.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Normalize Jira version names by removing .0 patch suffix GHA-169 Normalize Jira version names by removing .0 patch suffix Jan 27, 2026
@hashicorp-vault-sonar-prod
Copy link

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

GHA-169

Versions ending in .0 (e.g., 1.2.0) are now automatically shortened
to their minor version (e.g., 1.2) to maintain consistency in Jira.
Non-zero patches like 1.2.4 remain unchanged.

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: Adds version name normalization to strip .0 patch suffixes (e.g., 1.2.0 → 1.2) and refactors duplicate error handling logic.

Review Focus: The regex-based normalization logic and its edge cases; verify the refactored error handling maintains identical behavior for existing version lookup.

Start review at: create-jira-version/create_jira_version.py. It contains the core normalization function and refactored logic that changes user-facing behavior.

Model B:

Summary: Adds version name normalization to remove .0 patch suffixes (e.g., 1.2.01.2) and refactors duplicate version-exists handling into reusable functions.

Review Focus:

  • The regex pattern in normalize_version_name() correctly matches versions ending in .0, but verify it handles edge cases (single 0, prefixed versions like v1.2.0)
  • Ensure the refactored handle_existing_version() function maintains identical behavior to the original inline code
  • Confirm all test updates accurately reflect the new normalization logic and cover both normalized and non-normalized paths

Start review at: create_jira_version.py - normalize_version_name() function. This is the core new logic that affects version handling throughout the script, and its correctness is critical for the entire feature to work as intended.

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

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

See analysis details on SonarQube Cloud

Copy link

Choose a reason for hiding this comment

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

LGTM!

@nils-werner-sonarsource nils-werner-sonarsource merged commit 50a2bb9 into master Jan 27, 2026
6 checks passed
@nils-werner-sonarsource nils-werner-sonarsource deleted the normalize-jira-version-name branch January 27, 2026 18:27
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