jenkins-x-plugins/jx-release-version

Major and Minor didn't increment when Squash message has colon in text

Opened this issue · 0 comments

Issue

The issue happens with squash message when it has colon (":") , the conventional commit gets ignored when it has major, minor or breaking change.

example:
current version: 1.0.0
PR with 3 commits 3 :

feat!: new feature 
chore: blabla
fix: fix x bug 

Squand-and-Merge:
Title:

feat!: new feature

Squash-message:

The new feature will add the following: 
- x
- y
- z
- in USD:CAD; will be changed.

#Expected
The version will bumped from 1.0.0 -> 2.0.0
but the version bumped to 1.0.1

Debug log:

calculate version from commit messages
DEBUG: jx-release-version 2.6.10-dev+cb5085f running in debug mode in /workspace/source
DEBUG: Using "auto" version reader (with "")
DEBUG: Trying to read the previous version from the git tags first...
DEBUG: Skipping non-semver tag "hello-world1-0.0.4" (Invalid Semantic Version)
DEBUG: Skipping non-semver tag "hello-world10.0.4" (Invalid Semantic Version)
DEBUG: Found 73 semver tags with pattern ""
DEBUG: Previous version: 24.0.1
DEBUG: Using "auto" version bumper (with "")
DEBUG: Trying to bump the version using semantic release first...
DEBUG: Previous version tag commit is 6dfbcde58433b28249a515ac95db055afef7316a
DEBUG: Iterating over all commits since 2023-12-07 13:51:11 +0000 +0000
DEBUG: Checking commit 7343d8f58cb0974c80b5f31a6d39e8a75cedd4c4 with message chore: add variables
DEBUG: Parsing commit 7343d8f58cb0974c80b5f31a6d39e8a75cedd4c4
DEBUG: Checking commit 1f717c2c1cc91f24aeeedc39501645ed32866bcc with message feat!: [BQ-627] [Fundamentals Peers] Apply entities permissioning (#60)

When the permissioning system was introduced on the universe, we automatically had permissions applied to all our FUN APIs.

##### Before
What we didn't took into account is that currently, in order to get a company peers we get the top 10 entities (based on the known filter/sorting criterias) and we apply permissions on the top 10 filtered.
ex: if a client is only enabled to XETRA exchange and he will search for APC:DE, we:
- get the top 10 entities worldwide
- out of those top 10 entities we keep only those that have instruments on XETRA

##### After
Instead of applying permissions on the top 10 peers retrieved for the requested entity, first get the entities to which the user is permissioned and get top 10 out of the permissioned ones.
DEBUG: Parsing commit 1f717c2c1cc91f24aeeedc39501645ed32866bcc
DEBUG: Skipping non-conventional commit 1f717c2c1cc91f24aeeedc39501645ed32866bcc
DEBUG: Summary of conventional commits since 2023-12-07 13:51:11 +0000 +0000: semantic.conventionalCommitsSummary{conventionalCommitsCount:1, types:map[string]bool{"chore":true}, breakingChanges:false}
DEBUG: Incrementing patch component
DEBUG: Next version: 24.0.2
run with options -tag
DEBUG: jx-release-version 2.6.10-dev+cb5085f running in debug mode in /workspace/source
DEBUG: Using "auto" version reader (with "")
DEBUG: Trying to read the previous version from the git tags first...
DEBUG: Skipping non-semver tag "hello-world1-0.0.4" (Invalid Semantic Version)
DEBUG: Skipping non-semver tag "hello-world10.0.4" (Invalid Semantic Version)
DEBUG: Found 73 semver tags with pattern ""
DEBUG: Previous version: 24.0.1
DEBUG: Using "manual" version bumper (with "24.0.2")
DEBUG: Using manual version 24.0.2
DEBUG: Next version: 24.0.2
DEBUG: git tag -a v24.0.2 -m "Release version v24.0.2"
DEBUG: git push --tags
24.0.2version 24.0.2 is created