Repository navigation
GHA-444 Keep trailing .0 of two-part versions in create-jira-version - #217
Conversation
normalize_version_name stripped any trailing .0, so a requested next version of '12.0' was created in Jira as '12' and passed on as such to bump-version. Only strip the .0 patch when the version has at least three parts.
Co-authored-by: Tim Pohlmann <20153123+Tim-Pohlmann@users.noreply.github.com>
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Restricting .0 removal to three-part versions changes Jira release labels; an unexpected two-part format could now mismatch downstream version handling. Keeps the trailing ✅ 1 closed✅ Edge Case: get-jira-version still strips .0 from two-part versions
Verification Rules 1/1 met Repos 1 inspected · PRs 1 inspectedFunctional validation No results Rules 1 passed 2 not applicable
Broader impact Repos 1 inspected PRs 1 inspectedCross-repo 1 repository inspected 0 open impacts
Cross-PR 1 PR inspected 0 open impactsAuto-approval Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



What
normalize_version_nameincreate-jira-versionnow strips a trailing.0only for versions with at least three parts (1.2.0->1.2). Two-part versions such as12.0are left unchanged.Why
The old regex
^(.+)\.0$also matched two-part versions, so a requested next version of12.0was created in Jira as12. That value is exposed asrelease-in-jira.outputs.new-versionand reachesbump-versionas12. This was observed in the sonar-scanner-msbuild release. The new implementation splits on.instead of using a regex, which also avoids backtracking.