GHA-290 Fix get-jira-version to handle SemVer build metadata separator#147
GHA-290 Fix get-jira-version to handle SemVer build metadata separator#147kirill-knize-sonarsource wants to merge 1 commit intomasterfrom
Conversation
SummaryFixes SemVer build metadata handling in get-jira-version The action previously failed to parse version strings containing SemVer build metadata (e.g., What changed:
What reviewers should knowFor reviewers:
|
|
There was a problem hiding this comment.
The fix itself is correct and backward-compatible — stripping + metadata before the dot-split is the right approach, and versions without + pass through unchanged. However, the test workflow wasn't updated alongside the implementation, leaving a stale copy of the old logic and no coverage for the newly supported input format.
Logic duplication / stale test code
.github/workflows/test-get-jira-version.yml line 88 manually reimplements the action's version-parsing logic:
VERSION=$(echo "$RELEASE_VERSION" | cut -d '.' -f 1-3)This is the old implementation — the cut -d '+' -f 1 strip is missing. The test input (5.6.7.89) happens to have no +, so CI still passes, but the manually-inlined copy now diverges from the actual implementation. If this step is meant to validate that the env var is set correctly, it should either call the action itself (like the other test steps do) or at minimum mirror the current parsing pipeline.
Missing test case for the bug being fixed
None of the existing tests exercise a version string containing + (e.g., 5.2.3+80217). Adding one would confirm the fix works end-to-end and prevent regressions.



No description provided.