Skip to content

Commit

Permalink
🚑️ (tag): Fix runtime error
Browse files Browse the repository at this point in the history
semver: patch
  • Loading branch information
Somfic committed Jun 13, 2024
1 parent 993750a commit 40b460e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/helper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
.keys()
.filter(|s| !majors_delta.get(*s).unwrap().is_empty())
{
let scope = scope
let display_scope = scope
.chars()
.enumerate()
.fold(String::new(), |mut acc, (i, c)| {
Expand All @@ -39,8 +39,8 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
}
acc
});
changelog.push_str(&format!("\n### {}", scope));
for commit in majors_delta.get(&scope).unwrap() {
changelog.push_str(&format!("\n### {}", display_scope));
for commit in majors_delta.get(scope).unwrap() {
changelog.push_str(&format!(
"\n- {} {}",
commit.emoji.as_ref().unwrap_or(&"".to_string()),
Expand All @@ -58,7 +58,7 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
.filter(|s| !minors_delta.get(*s).unwrap().is_empty())
{
// Push scope, make it start with an uppercase letter
let scope = scope
let display_scope = scope
.chars()
.enumerate()
.fold(String::new(), |mut acc, (i, c)| {
Expand All @@ -69,8 +69,8 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
}
acc
});
changelog.push_str(&format!("\n### {}", scope));
for commit in minors_delta.get(&scope).unwrap() {
changelog.push_str(&format!("\n### {}", display_scope));
for commit in minors_delta.get(scope).unwrap() {
changelog.push_str(&format!(
"\n- {} {}",
commit.emoji.as_ref().unwrap_or(&"".to_string()),
Expand All @@ -87,7 +87,7 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
.keys()
.filter(|s| !patches_delta.get(*s).unwrap().is_empty())
{
let scope = scope
let display_scope = scope
.chars()
.enumerate()
.fold(String::new(), |mut acc, (i, c)| {
Expand All @@ -98,8 +98,8 @@ pub fn calculate_new_tag_based_on_commits() -> anyhow::Result<Option<semver::Ver
}
acc
});
changelog.push_str(&format!("\n### {}", scope));
for commit in patches_delta.get(&scope).unwrap() {
changelog.push_str(&format!("\n### {}", display_scope));
for commit in patches_delta.get(scope).unwrap() {
changelog.push_str(&format!(
"\n- {} {}",
commit.emoji.as_ref().unwrap_or(&"".to_string()),
Expand Down

0 comments on commit 40b460e

Please sign in to comment.