fix: show full branch name on github webhook messages

This commit is contained in:
Zomatree
2025-04-22 16:13:03 +01:00
parent 2a36f5912d
commit a841df3b36

View File

@@ -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::<Vec<_>>().join("/");
if forced {
let description = format!(
@@ -817,7 +815,8 @@ pub async fn webhook_execute_github(
commits.len(),
compare
);
let commit_description = commits
let commit_description = shorten_text(
&commits
.into_iter()
.map(|commit| {
format!(
@@ -829,7 +828,9 @@ pub async fn webhook_execute_github(
)
})
.collect::<Vec<String>>()
.join("\n");
.join("\n"),
1000
);
SendableEmbed {
title: Some(event.sender.login),