feat(changelog): expose commit parents#1376
Merged
woile merged 3 commits intocommitizen-tools:masterfrom Apr 13, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1376 +/- ##
==========================================
+ Coverage 97.33% 97.55% +0.21%
==========================================
Files 42 57 +15
Lines 2104 2656 +552
==========================================
+ Hits 2048 2591 +543
- Misses 56 65 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
noirbizarre
requested changes
Apr 8, 2025
Member
noirbizarre
left a comment
There was a problem hiding this comment.
Thanks for the contribution.
Good to me after the default list handling is fixed 👍🏼
woile
reviewed
Apr 9, 2025
Member
|
LGTM! After issues have been addressed we can merge, thanks! |
COMMIT_DATA in test_changelog.py had to be type annotated to avoid an issue with mypy linting when creating a GitCommit where the tool would expect the wrong type for the arguments.
b8d8ab7 to
ca410a4
Compare
woile
approved these changes
Apr 13, 2025
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
Expose commit parent(s) digests to the changelog process. This has an application
for projects that want to generate changelogs based on merge commits only, but it
is likely useful in more contexts, for example listing commits that belong to the same
PR under its own section.
Checklist
poetry alllocally to ensure this change passes linter check and testExpected behavior
The changelog generation code exposes the
parentsfield with a list of parentdigests in git commits.
Steps to Test This Pull Request
You can create a changelog template iterating the
parentsfield of changes andfor merge commits you should have at least 2 parents.
Additional context
Useful in the git workflow I'm currently working on, where merge commits cannot
be told apart by the changelog generation machinery and I need to distinguish them
as they are the only ones that can be taken into account without rewriting the project's
git history due to using varied standards throughout its life.