From cce33ee405536fc6675d52100ad2d7c27b8f770f Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 4 Jan 2025 18:57:33 +0800 Subject: [PATCH] feat: improve feishu notification formatting - Refactor the message construction in `send_feishu_notification` to use `jq` for better readability and maintainability. - Update the email and feishu notification content preparation in `main.sh` to use consistent variable names for subject and content. These changes enhance the clarity of the notification messages and ensure that the code is easier to modify in the future. The use of `jq` also reduces the risk of syntax errors in JSON formatting. --- feishu_notify.sh | 37 +++++++++++++++++-------------------- main.sh | 17 ++++++----------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/feishu_notify.sh b/feishu_notify.sh index 9639bb0..36062c6 100644 --- a/feishu_notify.sh +++ b/feishu_notify.sh @@ -7,27 +7,24 @@ CONTENT="$3" # 飞书通知 send_feishu_notification() { - local message=$(cat <