fix(changelog): ignore empty lines when using split_commits
#608
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
Prevent duplication of changelog when using
split_commit
and the commits have empty lines.Motivation and Context
When using split commits, if there is a an empty line between commits, it will duplicate the commit prior to the empty line, and I noticed that it will sometimes assign it to a different scope, though I have not investigated the why at this point.
One of the reasons this is a problem is that in certain GUIs (like GitHub Desktop) if you enter the first line in the header and the second line in the body, it will automatically add a new line.
fixes #606
How Has This Been Tested?
Using the existing test (changelog_generator_split_commits) by adding a new line in one of the commits.
Screenshots / Logs (if applicable)
Types of Changes
Checklist: