[improvement] currentBuild.changeSets can be referenced as changes
diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index 6e04081..f7bc15a 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -100,7 +100,7 @@
}
stage("Notifications") {
def changes = currentBuild?.changeSets
- def authors = !changes || changes.isEmpty() ? [] : currentBuild.changeSets.last().toList().collect { it.author.toString() }.unique()
+ def authors = !changes || changes.isEmpty() ? [] : changes.last().toList().collect { it.author.toString() }.unique()
println("The author of the last change: ${authors}")
if (!changes || !authors.contains('github')) jenkinsNotify()
}
diff --git a/vars/asfMavenTlpStdBuild.groovy b/vars/asfMavenTlpStdBuild.groovy
index 6288337..523f58f 100644
--- a/vars/asfMavenTlpStdBuild.groovy
+++ b/vars/asfMavenTlpStdBuild.groovy
@@ -180,7 +180,7 @@
}
stage("Notifications") {
def changes = currentBuild?.changeSets
- def authors = !changes || changes.isEmpty() ? [] : currentBuild.changeSets.last().toList().collect { it.author.toString() }.unique()
+ def authors = !changes || changes.isEmpty() ? [] : changes.last().toList().collect { it.author.toString() }.unique()
println("The author of the last change: ${authors}")
if (!changes || !authors.contains('github')) jenkinsNotify()
}