-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins Controller with Agents running on Linux, Mac and Windows.
I recently was able to resolve a list of slack usernames from a the build's current changeset, but for a review build, I'd like to be able to notify via slack the current author of the review change. Is there a way I can obtain a P4Change from currentBuild that says this is the shelved change list?
@NonCPS def getSlackUsers(changesets) { def resolver = new jenkins.plugins.slack.user.EmailSlackUserIdResolver( "${env.BOT_CRED_PSW}", jenkins.plugins.slack.HttpClient.getCloseableHttpClient(null)) resolver.setMailAddressResolvers(hudson.tasks.MailAddressResolver.all()) return resolver.resolveUserIdsForChangeLogSets(currentBuild.getChangeSets()).collect { "<@$it>" }.join(' ') }