This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-env.git


The following commit(s) were added to refs/heads/master by this push:
     new 40b0be0  GitHub emails should not trigger notifier which otherwise 
breaks the build
40b0be0 is described below

commit 40b0be00be0d67a845c11133467fbf15baff320c
Author: tibordigana <tibordig...@apache.org>
AuthorDate: Thu Jan 23 20:45:20 2020 +0100

    GitHub emails should not trigger notifier which otherwise breaks the build
---
 vars/jenkinsNotify.groovy | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vars/jenkinsNotify.groovy b/vars/jenkinsNotify.groovy
index bc8cd9a..3acea5e 100644
--- a/vars/jenkinsNotify.groovy
+++ b/vars/jenkinsNotify.groovy
@@ -102,7 +102,9 @@ def call(Map params = [:]) {
         messageBody = messageBody + "\n"
     }
     println("The authors of changes ${authors.unique()}.")
-    if (authors.contains('github')) sendMail = false
+    for (def author in authors) {
+        sendMail &= !author.contains('github')
+    }
     if (sendMail) {
         messageBody = messageBody + '\n${FAILED_TESTS}\n' + messageTail
         println("Sending email ...")

Reply via email to