luhaowen 5 days ago
parent
commit
6f21282e25
1 changed files with 4 additions and 6 deletions
  1. 4 6
      src/com/example/FeishuNotifier.groovy

+ 4 - 6
src/com/example/FeishuNotifier.groovy

@@ -23,7 +23,7 @@ class FeishuNotifier implements Serializable {
                     (status == 'SUCCESS') ? '✅ 构建成功' :
                     (status == 'FAILURE') ? '❌ 构建失败' : '🟡 构建不稳定'
 
-        // 2. 飞书极简卡片:header + elements
+        // 2. 飞书卡片:header + elements
         def payload = [
             msg_type: 'interactive',
             card: [
@@ -32,11 +32,7 @@ class FeishuNotifier implements Serializable {
                         tag: 'plain_text',
                         content: title
                     ],
-                    subtitle: [
-                        tag: 'lark_md',
-                        content: "**任务名称:${jobName}**"   // ← 关键改动
-                    ],
-                    template: color   // 左侧条颜色
+                    template: color
                 ],
                 elements: [
                     [
@@ -44,6 +40,8 @@ class FeishuNotifier implements Serializable {
                         text: [
                             tag: 'lark_md',
                             content: """
+**📋 任务名称:${jobName}**  
+
 **构建编号**: [#${buildNumber}](${buildUrl})  
 **持续时间**: ${duration}  
 **分支**: ${branch}