huskies: merge 944
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
//! with `[project-name]` prefixes. The actual I/O (HTTP polling, spawning
|
||||
//! tasks, sending messages) lives in `io.rs`.
|
||||
|
||||
use crate::pipeline_state::Stage;
|
||||
use crate::service::events::StoredEvent;
|
||||
use crate::service::notifications::{
|
||||
format_blocked_notification, format_error_notification, format_stage_notification,
|
||||
stage_display_name,
|
||||
};
|
||||
|
||||
/// Format a [`StoredEvent`] from a project into a gateway notification.
|
||||
@@ -24,9 +24,9 @@ pub fn format_gateway_event(project_name: &str, event: &StoredEvent) -> (String,
|
||||
to_stage,
|
||||
..
|
||||
} => {
|
||||
let from_display = stage_display_name(from_stage);
|
||||
let to_display = stage_display_name(to_stage);
|
||||
let (plain, html) = format_stage_notification(story_id, None, from_display, to_display);
|
||||
let from_typed = Stage::from_dir(from_stage).unwrap_or(Stage::Upcoming);
|
||||
let to_typed = Stage::from_dir(to_stage).unwrap_or(Stage::Upcoming);
|
||||
let (plain, html) = format_stage_notification(story_id, None, &from_typed, &to_typed);
|
||||
(format!("{prefix}{plain}"), format!("{prefix}{html}"))
|
||||
}
|
||||
StoredEvent::MergeFailure {
|
||||
|
||||
Reference in New Issue
Block a user