Skip to content

Commit

Permalink
feat(template): add breaking_description to the template context (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Aug 20, 2021
1 parent 5219b9e commit e0f6ca1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion git-cliff-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ default-features = false
features = ["toml", "yaml"]

[dependencies.git-conventional]
version = "0.9.2"
version = "0.10.0"
features = ["serde"]

[dependencies.rust-embed]
Expand Down
6 changes: 5 additions & 1 deletion git-cliff-core/src/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl Serialize for Commit<'_> {
where
S: Serializer,
{
let mut commit = serializer.serialize_struct("Commit", 7)?;
let mut commit = serializer.serialize_struct("Commit", 8)?;
commit.serialize_field("id", &self.id)?;
match &self.conv {
Some(conv) => {
Expand All @@ -137,6 +137,10 @@ impl Serialize for Commit<'_> {
"group",
self.group.as_ref().unwrap_or(&conv.type_().to_string()),
)?;
commit.serialize_field(
"breaking_description",
&conv.breaking_description(),
)?;
commit.serialize_field("breaking", &conv.breaking())?;
commit.serialize_field("scope", &conv.scope())?;
}
Expand Down

0 comments on commit e0f6ca1

Please sign in to comment.