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

How to allow breaking changes (based on commit messages)? #764

Open
JanWennrichPCSG opened this issue Mar 18, 2024 · 1 comment
Open

How to allow breaking changes (based on commit messages)? #764

JanWennrichPCSG opened this issue Mar 18, 2024 · 1 comment

Comments

@JanWennrichPCSG
Copy link

Hello,

I just gave the tool a test and really like it! We're now planning to add it to our (GitLab) CI pipelines.

We're using semantic versioning and the conventional commits specification for our commit messages in combination with semantic release.
This automatically determines the next version number based on the commit messages.

So the commit message fix: very important fix would create a new patch version.
Whereas when commiting refactor!: remove deprecated classes (notice the !) would create a new major version.

Therefore breaking changes are allowed in commits that contain an !.

When running the backward compatibility check on such a breaking change commit, the tool complains about the breaking change. But as the commit is marked with the !, a major version would be released and the breaking change should be allowed. So the tool would break our CI.

Is there a way to tell the tool to ignore certain commits or commit messages?
Or am I approaching this problem incorrectly?

Thank you in advance and keep up the great work!

@JanWennrichPCSG JanWennrichPCSG changed the title How to allow breaking changes? How to allow breaking changes (based on commit messages)? Mar 18, 2024
@Ocramius
Copy link
Member

If you have your own idea of "previous" version, use --from= with your own SHA1 of choice there.

As for "excluding" stuff: you would make a change, get CI to red, do a release, and then you'd be back to green.

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

2 participants