DABSquared/gitlab-plugin — pull request #36 by kasper-f (2014-12-21 23:51:13+00:00)
Title: Locate build by data from git plugin

Changed getBuildBySHA1 and getBuildByBranch to use the git plugins MergerRecord and BuildData to determine if the build is a merge what SHA1/branch the build cover.

This way we can ensure that we locate the correct build even in the cases where the ParameterActions is not present in the build.

The getBuildByBranch will only return builds that is not build from a merge.

[MergeRecord] (https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/util/MergeRecord.java)
[BuildData] (https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/util/BuildData.java)
[Build](https://github.com/jenkinsci/git-plugin/blob/master/src/main/java/hudson/plugins/git/util/Build.java)