[maven-jenkins-env] branch master updated: Log unique commits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-jenkins-env] branch master updated: Log unique commits

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

rfscholte 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 5ce4f58  Log unique commits
5ce4f58 is described below

commit 5ce4f58bc8d541e88ccc680e90edca59e1e839f1
Author: rfscholte <[hidden email]>
AuthorDate: Sat Sep 14 18:29:12 2019 +0200

    Log unique commits
---
 vars/jenkinsNotify.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vars/jenkinsNotify.groovy b/vars/jenkinsNotify.groovy
index bc8cd9a..5453342 100644
--- a/vars/jenkinsNotify.groovy
+++ b/vars/jenkinsNotify.groovy
@@ -94,7 +94,7 @@ def call(Map params = [:]) {
     } else {
         messageBody = messageBody + "\n\nChanges:\n";
         for (def changeSet in currentBuild.changeSets) {
-            for (def change in changeSet) {
+            for (def change in changeSet.toUnique{ a, b -> a.commitId <=> b.commitId }) {
                 messageBody = messageBody + "\n* ${change.msg.trim().replaceAll('\n','\n  ')}"
                 authors += change.author.id
             }