mirror of
https://github.com/conventional-commits/conventionalcommits.org.git
synced 2026-03-22 12:44:37 -05:00
refactor example isn't a refactor #88
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 @gabrielf on GitHub (Jan 16, 2020).
The example of a refactor is
But is this really a refactor? I guess people have slightly different definitions of refactoring but Wikipedia says (emphasis mine):
With that definition you cannot have a refactor commit that also contains a breaking change.
I think the example should be changed to something like:
The example containing
!could be changed to afeat:.@stevemao commented on GitHub (Jan 16, 2020):
I agree this is not the best example. And previously you couldn't include breaking changes in refactor but we loosen the rule a bit. Maybe we could write a better example of refactor and use either
feator some custom tag to demonstrate!@shaman-apprentice commented on GitHub (Mar 8, 2021):
May I ask, why did you loosen it? From my point of view it should definitely not be allowed, as a refactor prohibits breaking changes by definition.
@damianopetrungaro commented on GitHub (Mar 8, 2021):
@gabrielf good one tho!
Wanna open a PR using
featin the examples you pointed out?@shaman-apprentice commented on GitHub (Oct 8, 2021):
@gabrielf I hope you don't mind I created a PR with my ideas.
Changing to "feat!: drop support for Node 6" didn't feel right to me, as dropping something is not really a new feature, is it? So I came up with "feat!: enforce authentication for all requests".
I also was so free to remove the example with both "!" and "BREAKING CHHANGE" footer. I think commit messages shouldn't contain duplicate information. Also I felt it is less to read for the reader of conventionalcommits.org, which makes it a very little more attractive for potentially new adopters.
Feel very welcome to let me know, what you think about it :)
@javier-godoy commented on GitHub (Jul 12, 2022):
I agree that the new example is easier to understand, however:
@gabrielf
@shaman-apprentice
How would you call a change that renames a function? Assume that the function is part of the public API, thus renaming it is a breaking change. It doesn't change its "external behavior" either (unless the function name is considered part an attribute of the behavior).