mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 08:06:09 +01:00
Jenkins: Send emails to last committer only
This commit is contained in:
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -56,7 +56,7 @@ node() { // No specific label
|
||||
// Find maven warnings and visualize in job
|
||||
warnings consoleParsers: [[parserName: 'Maven']], canRunOnFailed: true
|
||||
|
||||
mailIfStatusChanged(defaultEmailRecipients)
|
||||
mailIfStatusChanged(commitAuthorEmail)
|
||||
}
|
||||
|
||||
void analyzeWith(Maven mvn) {
|
||||
@@ -85,3 +85,12 @@ void analyzeWith(Maven mvn) {
|
||||
mvn "${mvnArgs}"
|
||||
}
|
||||
}
|
||||
|
||||
String getCommitAuthorComplete() {
|
||||
new Sh(this).returnStdOut 'hg log --branch . --limit 1 --template "{author}"'
|
||||
}
|
||||
|
||||
String getCommitAuthorEmail() {
|
||||
def matcher = getCommitAuthorComplete() =~ "<(.*?)>"
|
||||
matcher ? matcher[0][1] : ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user