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
auto version: Confusing behavior of Conventional Commits Plugin #1719
Comments
This is a tricky one to fix! Just to be clear you expect:
to create a minor release and for the changelog to look something like #### Enhancement
- Enhancement PR
- new shiny feature
#### Build
- some chore work
#### Authors: 1
- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) |
The above comments pertain to this and you can test out if I fixed it by installing the canary version from this PR.
This breaks with how |
It would be great if #1723 checked all commits after the latest version, instead of only the most recent commit. |
🚀 Issue was released in |
@Yeti-or if you find any remaining issue with the plugin feel free to open another issue. Thanks for the in depth bug report! |
Describe the bug
First of all we don't use labels on our PR, and use
"conventional-commits", "npm" & "slack"
plugins.We have two problems with CC Plugin, and I believe they are connected.
Let's discuss master branch flow:
When you merge PR and don't label PR;
cc-plugin will omit merge commit from commits that participate in
auto version
:auto/plugins/conventional-commits/src/index.ts
Lines 189 to 202 in 8b4d1f2
so if you have something like these:
Everything is okay, and
auto version
returnsminor
For case when we have no need to release
auto version
will return nothing.But if we have two commits:
I would expect to get
minor
but instead I get nothing fromauto version
because
auto version
checks necessity of release in first commit. And first one was omited by cc-plugin.auto/packages/core/src/semver.ts
Lines 219 to 227 in 8b4d1f2
So whole pr with bunch of feat/major commits will be skipped.
And you couldn't predict these because canary version was published okay in your PR.
Second problem:
I suppose it's similar problem. If we write in pull-request summary something using conventional-commit msg:
Title of pr will be provided to merge commit.
auto/packages/core/src/release.ts
Line 524 in 8b4d1f2
Then CC-Plugin will try to determine version of these commit:
auto/plugins/conventional-commits/src/index.ts
Line 145 in 8b4d1f2
inside
getBump
CC- Plugin will parse PR title.auto/plugins/conventional-commits/src/index.ts
Line 112 in 8b4d1f2
conventionalCommit would be smth like this:
so
label
would be'skip'
And moreover this commit wouldn't be omitted, because it has label and cc-plugin omits only commits without labels:
auto/plugins/conventional-commits/src/index.ts
Line 182 in 8b4d1f2
So you could skip release by using conventional commits in your pr title. But I didn't expected it, and docs didn't prepared me.
It could be done in such steps:
still get canary version in pr though
Expected behavior
skip-release
someword: text
.Environment information:
The text was updated successfully, but these errors were encountered: