From 113e5282ef1a93a74c018e8bb1fcb8d0368f4b88 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 4 Aug 2023 15:01:32 +0200 Subject: [PATCH] fix(crate): initial pr always included the entire changelog Signed-off-by: kjuulh --- crates/cuddle-please-commands/src/release_command.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/cuddle-please-commands/src/release_command.rs b/crates/cuddle-please-commands/src/release_command.rs index c8c8272..af58090 100644 --- a/crates/cuddle-please-commands/src/release_command.rs +++ b/crates/cuddle-please-commands/src/release_command.rs @@ -149,7 +149,8 @@ impl ReleaseCommandHandler { owner, repository, &next_version.to_string(), - &changelog_last_changes.unwrap(), + &changelog_last_changes + .ok_or(anyhow::anyhow!("could not get the latest changes"))?, existing_pr, )? } else { @@ -164,7 +165,8 @@ impl ReleaseCommandHandler { owner, repository, &next_version.to_string(), - &changelog, + &changelog_last_changes + .ok_or(anyhow::anyhow!("could not get the latest changes"))?, branch, )? } else {