ソースを参照

Initial commit13

luhaowen 1 週間 前
コミット
7a95c4b27d
1 ファイル変更5 行追加1 行削除
  1. 5 1
      src/com/example/FeishuNotifier.groovy

+ 5 - 1
src/com/example/FeishuNotifier.groovy

@@ -11,7 +11,8 @@ class FeishuNotifier implements Serializable {
         this.webhookUrl = webhookUrl
     }
 
-    void send(String status, String jobName, String buildNumber, String buildUrl, String duration) {
+    void send(String status, String jobName, String buildNumber, String buildUrl,
+              String duration, String branch, String commitMsg, String author) {
         def payload = [
             msg_type: 'text',
             content: [
@@ -20,6 +21,9 @@ class FeishuNotifier implements Serializable {
                 任务名称: ${jobName}
                 构建编号: #${buildNumber}
                 持续时间: ${duration}
+                分支: ${branch}
+                提交: ${commitMsg}
+                作者: ${author}
                 查看详情: ${buildUrl}
                 """.stripIndent()
             ]