mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-03-22 12:44:37 -05:00
Support for hotfixes? #185
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paul-uz on GitHub (Aug 24, 2023).
What should we do for a hotfix? Use
fix? Or can we have a specifichotfixtype added?@mentalisttraceur commented on GitHub (Aug 24, 2023):
Another example of something that would be well-served by #537 .
@mentalisttraceur commented on GitHub (Aug 24, 2023):
I don't think it's a common-enough use-case to go into the core spec, but some projects have good reason to make the distinction between fixes-that-can-wait and fixes-that-need-to-go-in-now. So I can see at least two good reasons to have a
hotfixchange type distinct from afixtype:A
hotfixchange type with semantics like "bypass the normal pipeline (for example, any/all of: don't do the full slow testing; don't reject if the linter complains; fire off the release pipeline; exclude all non-hotfix changes merged since last release)".A
hotfixchange type with semantics like "this is likefix, but it is retroactively going into the most recent version, not into the next version (so tooling which automatically increments the version should treat it differently)".@paul-uz commented on GitHub (Aug 24, 2023):
For me, a hotfix only ever increments the patch version, based on gitflow.
I think it's used by enough software developers/teams that it would be a great fit inthe core spec
@mentalisttraceur commented on GitHub (Aug 24, 2023):
Right, which means you at most want the 1st semantic I mentioned, and never the 2nd. That makes it more like a
fix, and many teams would be happy to just usefixfor that.If I was designing a CCRFI for this, I'd make the 2nd semantic optional. For example, I might propose that tools by default treat
hotfixas bumping the version just likefixdoes, but also implement a flag or environment variable which flips on "hotfix does not bump version" behavior.Re: core spec fit: I agree that hotfixes are a very common distinction for teams to make in their commits, and if Conventional Commits was a "thicker" spec, I'd agree that
hotfixshould be in it! But looking at all the context clues, I infer that Conventional Commits is intended to be the smallest-viable-foundation for two goals: a parseable commit format, and mapping commits to SemVer semantics. The core only definesfeatandfixchange types, actively encourages extensions, and has never merged any of the community suggestions for other change types into core.@paul-uz commented on GitHub (Aug 25, 2023):
Lets see what the repo owner/maintainers say.
@leafknode commented on GitHub (Feb 20, 2025):
A little necromancy here but I came across this issue when searching for whether
hotfixwas a valid conventional commit. I'm also on the side that it would be a value add, particularly in the context of tracking DORA Change Failure Rate. While it's possible to track this through your issue tracking system (Jira, etc), I'd prefer to do this at the code level so that the commit is also distinctly different from afix@MossPalmer-POL commented on GitHub (May 15, 2025):
From a versioning point of view. Assuming that a hotfix can use the patch alone is misguided.
If I release 1.0.0 of my software, then develop/merge a fix (1.0.1) then before that's released we work on a critical issue in prod that needs resolving, I can't reuse the 1.0.1 tag, I'd need something in between, hence something like 1.0.0+hotfix.1
@paul-uz commented on GitHub (May 15, 2025):
surely you'd use 1.0.2?
@kamilzzz commented on GitHub (Jun 17, 2025):
Maybe if it is not released yet it should not have any semver assigned?
Then you simply hotfix and release 1.0.1, probably include hotfix on your main branch, and if you are ready to release new version you either use 1.1.0 - as I guess in the meantime you developed some new features, or 1.0.2 if new release is indeed only bugfix.