fix(commit): preserve author metadata in parseConventionalCommits - #2874
Open
anishesg wants to merge 1 commit into
Open
fix(commit): preserve author metadata in parseConventionalCommits#2874anishesg wants to merge 1 commit into
anishesg wants to merge 1 commit into
Conversation
The `parseConventionalCommits()` function in `src/commit.ts` was dropping the `author` field when transforming `Commit` objects into `ConventionalCommit` objects. This caused author metadata to be lost before changelog rendering, even though the `include-commit-authors` config option was enabled and the GitHub API provided author data. Signed-off-by: anish <anishesg@users.noreply.github.com>
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.
The
parseConventionalCommits()function insrc/commit.tswas dropping theauthorfield when transformingCommitobjects intoConventionalCommitobjects. This caused author metadata to be lost before changelog rendering, even though theinclude-commit-authorsconfig option was enabled and the GitHub API provided author data.The fix adds
author: commit.authorto the object literal at line 434 where other fields likesha,message,files, andpullRequestare already being preserved. This ensures that author information flows through the entire pipeline from commit fetch to changelog generation.A regression test was added to verify that author metadata (name, email, username) is correctly preserved when parsing conventional commits.
Fixes #2761