git-next/crates/cli/src/alerts/desktop.rs
Paul Campbell 6de8e4f988
All checks were successful
Rust / build (push) Successful in 1m55s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
feat: prevent duplicate alerts
Closes kemitix/git-next#128
2024-08-03 23:07:56 +01:00

10 lines
352 B
Rust

//
use crate::alerts::short_message;
use git_next_core::git::UserNotification;
pub(super) fn send_desktop_notification(user_notification: &UserNotification) {
let message = short_message(user_notification);
if let Err(err) = notifica::notify("git-next", &message) {
tracing::warn!(?err, "failed to send desktop notification");
}
}