Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: feat Git commits that include Conventional Commit 'scopes' do NOT increment MINOR version #96

Open
haysclark opened this issue Dec 16, 2021 · 2 comments
Assignees

Comments

@haysclark
Copy link

feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).

Expected behavior:

git commit --am 'feat(api): adds cool feature

Should increment MINOR version when jx-release-version run. (e.g: 0.0.0 -> 0.1.0)

Actual behavior:

Only the PATCH version is incremented. (e.g: 0.0.0 -> 0.0.1)

Note:

Removing the scope from the git commit message does increment MINOR version correctly.

git commit --am 'feat: adds cool feature to api

version: 2.5.1
source: ghcr.io/jenkins-x/jx-release-version:2.5.1

@vbehar vbehar self-assigned this Dec 17, 2021
@vbehar
Copy link
Collaborator

vbehar commented Dec 17, 2021

Ok I'll have a look early next week

@lemeurherve
Copy link
Contributor

Can't reproduce on last version 2.7.0, the increment is a minor one with a commit including feat (with and without scope):

$ git commit -m 'feat(api): adds cool feature' --allow-empty
[issue96-fix-scope 73bb281] feat(api): adds cool feature
$ ./bin/jx-release-version -debug                                                 
DEBUG: jx-release-version 2.6.11-dev+8acbdc5 running in debug mode in /Users/veve/j-infra/jx-release-version
DEBUG: Using "auto" version reader (with "")
DEBUG: Trying to read the previous version from the git tags first...
DEBUG: Found 102 semver tags with pattern ""
DEBUG: Previous version: 2.7.1
DEBUG: Using "auto" version bumper (with "")
DEBUG: Trying to bump the version using semantic release first...
DEBUG: Previous version tag commit is 931609520a0f118c9c115ae7fbda846c1b6735c0
DEBUG: Iterating over all commits since 2023-08-31 20:57:31 +0100 +0100
DEBUG: Checking commit 73bb281737ba87cab68cc2b4b00bf13a4c113c6c with message feat(api): adds cool feature
DEBUG: Parsing commit 73bb281737ba87cab68cc2b4b00bf13a4c113c6c
DEBUG: Checking commit 931609520a0f118c9c115ae7fbda846c1b6735c0 with message Merge pull request #115 from jenkins-x-plugins/dependabot/go_modules/gopkg.in/yaml.v3-3.0.0

chore(deps): bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0
DEBUG: Found first commit 931609520a0f118c9c115ae7fbda846c1b6735c0 and stopping iteration
DEBUG: Summary of conventional commits since 2023-08-31 20:57:31 +0100 +0100: semantic.conventionalCommitsSummary{conventionalCommitsCount:1, types:map[string]bool{"feat":true}, breakingChanges:false}
DEBUG: Found at least 1 new feature - incrementing minor component
DEBUG: Next version: 2.8.0
2.8.0

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

No branches or pull requests

3 participants