Use git-plugin to determine if branch is covered in the build 

In case you use a jenkins slave node to build the ParametersAction is not available and thereby the build is not considered. 

Instead of looking at ParameterActions for branch name the preferred way to determine if a build contains a specific branch is to use the git-plugin BuildData object.

This should fix the jira issue at jenkins https://issues.jenkins-ci.org/browse/JENKINS-25844