fix(commands/changelog): use topological order for commit ordering#677
Merged
woile merged 1 commit intocommitizen-tools:v3from Mar 11, 2023
Merged
Conversation
3f20fb7 to
4ff1568
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## v3 #677 +/- ##
=====================================
Coverage ? 97.98%
=====================================
Files ? 41
Lines ? 1835
Branches ? 0
=====================================
Hits ? 1798
Misses ? 37
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Topological ordering should be used when ordering commits in changelog history. This allows commits to be shown properly in the order they were added to the codebase, even if non-linear merges were used
4ff1568 to
b5125cb
Compare
Member
|
I'm testing this feature and something weird is happening: Run And when we run a range Thoughts? |
Member
|
Forget my comment, I was testing with an old version 🤦🏻 |
Contributor
Author
|
Nice! Happy to hear this is being tested 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This MR comes from an issue raised here
Topological ordering should be used when ordering commits in changelog history. This allows commits to be shown properly in the order they were added to the codebase, even if non-linear merges were used
Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
With a git history that has non-linear merges, I want my commits to be ordered in the order that they were introduced in the codebase.
So having a git graph like so:
If I merge
branchBbeforebranchAlike so:I expect the generated changelog to be this:
I also expect commands like
cz changelog v0.3.0andcz changelog v0.2.0..v0.3.0to produce identical changelogs forv.0.3.0(which isn't currently the case - see issue)Steps to Test This Pull Request
branchAbranchBbranchAfeat: I will be merged secondbranchBfeat: I will be merged firstmainbranchBintomainbranchAintomaincz changelog --dry-runAdditional context