Skip to content
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

fix(changelog): ignore empty lines when using split_commits #608

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions git-cliff-core/src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ impl<'a> Changelog<'a> {
commit
.message
.lines()
.flat_map(|line| {
.filter_map(|line| {
let mut c = commit.clone();
c.message = line.to_string();
Self::process_commit(c, &self.config.git)
if !c.message.is_empty() {
Self::process_commit(c, &self.config.git)
} else {
None
}
})
.collect()
} else {
Expand Down Expand Up @@ -722,6 +726,7 @@ style: make awesome stuff look better
String::from("123abc"),
String::from(
"chore(deps): bump some deps

chore(deps): bump some more deps
chore(deps): fix broken deps
",
Expand Down
Loading