-
-
Notifications
You must be signed in to change notification settings - Fork 281
Inconsistent changelog behavior based on rev-range & merge strategy #660
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
Comments
Any thoughts about the aftermentioned issue? |
We could introduce this to the v3 branch. Could you submit a PR pointing to the v3 branch? Thanks! |
I can do that 👍 I just wanted to make sure this approach is the desired one Because I also suppose that |
The output of |
Sorry for the slow cadence. No proper roadmap, @Lee-W and me are with a short available capacity and I think in general commitizen meets our expectations, that's probably why development goes at this rate (which I also think is fine). If I were to give a date, worst case scenario, I'll organize a sprint for europython 2023 in July and push for this change to commitizen. Because I'd like to review in depth |
Okay! Thanks for the explanation and details about V3, makes sense. |
Uh oh!
There was an error while loading. Please reload this page.
Description
We are running into inconsistent behavior of the changelog command depending on the rev-range used when we have a branch with different merge commits.
The reason is that when generating the changelog, commitizen is using the author-date-order (see here)
This means that in the scenario where you merge using a non-linear merge strategy (which is often the default), then the changelog command become inconsistent. (See examples below)
Steps to reproduce
Here is an example (you can find this example in a test github repo here:
cz bump
commit v0.1.0git merge mr1
cz bump
(tags v0.2.0)git merge mr2
cz bump
(tags v0.3.0)We end up with the following git tree:
The expectation now is for
cz changelog v0.3.0
&cz changelog v0.2.0..v0.3.0
to show the same content forv0.3.0
, but it is not the case. Because commitizen orders commits by author_date, when using a rev-range it is ordering commits by date, which makes the commit frommr2
erroneously appear in v0.2.0. However when using a singlerev
it appears as expected.Here is the output of the different commands
Current behavior
Running
cz changelog v0.3.0
&cz changelog v0.2.0..v0.3.0
gives a different output under the v0.3.0 entryDesired behavior
Running
cz changelog v0.3.0
&cz changelog v0.2.0..v0.3.0
gives the same output under the v0.3.0 entryScreenshots
No response
Environment
Commitizen Version: 2.40.0
Python Version: 3.10.9 (main, Dec 27 2022, 11:11:24) [Clang 14.0.0 (clang-1400.0.29.202)]
Operating System: Darwin
Proposed solutions/ideas
I think the solution would be to change
But I suppose this may be breaking to existing changelogs, so I wonder what is your take on this?
The text was updated successfully, but these errors were encountered: