diff --git a/crates/delta/src/routes/webhooks/webhook_execute_github.rs b/crates/delta/src/routes/webhooks/webhook_execute_github.rs index a5b0d12b..6d9c8b60 100644 --- a/crates/delta/src/routes/webhooks/webhook_execute_github.rs +++ b/crates/delta/src/routes/webhooks/webhook_execute_github.rs @@ -788,9 +788,7 @@ pub async fn webhook_execute_github( r#ref, .. }) => { - let Some(branch) = r#ref.split('/').nth(2) else { - return Ok(()); - }; + let branch = r#ref.split('/').skip(2).collect::>().join("/"); if forced { let description = format!( @@ -817,19 +815,22 @@ pub async fn webhook_execute_github( commits.len(), compare ); - let commit_description = commits - .into_iter() - .map(|commit| { - format!( - "[`{}`]({}) {} - {}", - &commit.id[0..=7], - commit.url, - shorten_text(&commit.message, 50), - commit.author.name - ) - }) - .collect::>() - .join("\n"); + let commit_description = shorten_text( + &commits + .into_iter() + .map(|commit| { + format!( + "[`{}`]({}) {} - {}", + &commit.id[0..=7], + commit.url, + shorten_text(&commit.message, 50), + commit.author.name + ) + }) + .collect::>() + .join("\n"), + 1000 + ); SendableEmbed { title: Some(event.sender.login),