Answer the question
In order to leave comments, you need to log in
How to get commit author email in multibranch pipeline?
Good afternoon, colleagues.
there is a task to send a letter with the result to the author of the commit (to the authors of the commits, if we are talking about PR) when building;
there is a configured job in Jenkins and the Jenkinsfile in the repository (scripted notation).
Authors and text are obtained by the following code:
def commits = currentBuild.changeSets.collectMany { it.toList().collect { it.msg + " - _" + it.author + "_" } }.unique().join('\n')
def authors = currentBuild.changeSets.collectMany { it.toList().collect { it.author } }.unique().join(',')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question