Use author of the last commit for "pushed by" description

This commit is contained in:
Robin Müller 2016-08-27 17:42:19 +02:00
parent 8619eb179c
commit 3441703df3
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ ChangeLog
* #69: Link to gitlab merge request url in getShortDescription posted to jenkins
* #396: Jenkins job stuck publishing build status
* #400: Fix gitlabBuilds step to actually use 'pending'
* JENKINS-35258: ci-skip and author should use the latest commit, not the first one from the push event
1.3.0
=====================

View File

@ -104,7 +104,7 @@ class PushHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<PushHook>
final List<Commit> commits = hook.getCommits();
if (commits != null && !commits.isEmpty()) {
return commits.get(0).getAuthor().getName();
return commits.get(commits.size() - 1).getAuthor().getName();
}
return null;