Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nit: always show flow meta data, append user provided msg #5026

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions backend/windmill-api/src/slack_approvals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ async fn get_modal_blocks(

let created_at_formatted = created_at.format("%Y-%m-%d %H:%M:%S").to_string();

let fallback_message = format!(
let mut message_str = format!(
"A workflow has been suspended and is waiting for approval:\n\n\
*Created by*: {created_by}\n\
*Created at*: {created_at_formatted}\n\
Expand All @@ -1033,7 +1033,10 @@ async fn get_modal_blocks(
*Flow ID*: {parent_job_id_str}\n\n"
);

let mut message_str: String = message.unwrap_or_else(|| fallback_message.as_str()).to_string();
// Append custom message if provided
if let Some(msg) = message {
message_str.push_str(msg);
}

tracing::debug!("Schema: {:#?}", schema);

Expand Down