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

Option to ignore merge commits #155

Open
DP19 opened this issue May 20, 2024 · 1 comment · May be fixed by #156
Open

Option to ignore merge commits #155

DP19 opened this issue May 20, 2024 · 1 comment · May be fixed by #156

Comments

@DP19
Copy link

DP19 commented May 20, 2024

We just added svu / goreleaer to one of our repos and it didn't quite work as i would have expected it to.

Previous tag v1.0.3

I made a branch (goreleaser-prerelease) that tagged commits with a prerelease tag via:
svu prerelease --pre-release ${branch} --build ${ci_build_num}

Since the commits here were feat!: this was producing tags like

v2.0.0-goreleaser-prerelease.0+3396

Everything is great up to this point 👍🏻

However once this branch merged back to master, the next tag was producing 2.1.0 instead of the expected v2.0.0 with just the prereleae options removed.

It seems like since we have an external bot merging commits with messages like

Merge pull request $PR-LINK from repo/branch
feat: add goreleaser for po

which include the pr title

svu was using the current tag as the prerelease tag v2.0.0-goreleaser-prerelease.0+3396 then bumping the Minor due to this message.

I saw another issue mentioning a no-prerelease flag that isn't supported anymore and links to other options but I don't think it would have fixed this issue, since this would have also just added on more to the --pre-release / --build options or forced a Minor bump which was happening anyway. Is there anyway to add in a ignore-merge-commits option since the default is just to use the commit as the pr title this seems like it will continue to happen if the branch being merged in had a prerelease.

@caarlos0
Copy link
Owner

hmmm.. that shouldn't be the case... I believe svu only looks at the first line of the commit message, and the regexes match the beginning of the line only.

this looks more like it should have ignored the prerelease version, but didn't 🤔

will take a look!

caarlos0 added a commit that referenced this issue May 21, 2024
this would fix #155 I think... but would also probably be a breaking
change.. not sure about it yet
@caarlos0 caarlos0 linked a pull request May 21, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants