diff --git a/src/hooks/mod.rs b/src/hooks/mod.rs index 8532138..3268e4c 100644 --- a/src/hooks/mod.rs +++ b/src/hooks/mod.rs @@ -33,20 +33,16 @@ pub fn format_hook(hook: &Hook) -> Option { ) } Hook::Push(push) => { - if push.ref_ != "refs/heads/main" { - // Ignore: Action not on 'main' branch - return None; - } - // Unlikely to be reached as 'main' is probably never going to be deleted if push.commits.len() == 0 { // Ignore: Branch got deleted return None; } let mut text = format!( - "[{}] {} pushed {} commits to main", + "[{}] {} pushed {} commits to {}", push.repository.name, push.pusher.name, push.commits.len(), + push.ref_, ); // Display max 3 commits for commit in push.commits.clone().into_iter().take(3) {