luhaowen 1 tydzień temu
rodzic
commit
ddecb963b4
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      vars/feishuNotify.groovy

+ 1 - 1
vars/feishuNotify.groovy

@@ -6,7 +6,7 @@ def call(String webhookUrl, String status) {
     def commitMsg  = sh(returnStdout: true, script: "git log -1 --pretty=%B").trim()
     def author     = sh(returnStdout: true, script: "git log -1 --pretty=%an").trim()
     def commitTime = sh(returnStdout: true, script: "git log -1 --pretty=%ci").trim()   // 新增
-    def branch     = env.GIT_BRANCH ?: env.BRANCH_NAME ?: 'unknown'
+    def branch     = env.brach ?: env.GIT_BRANCH ?: env.BRANCH_NAME ?: 'unknown'
 
     new FeishuNotifier(this, webhookUrl).send(
         status,