Revert "[jenkins] - use a new method to determine the branch name by ignoring the pr ref_spec - thx to theuni for figuring that out"

This reverts commit afb5a6998c0c0a191e88ae53671df79fc00d55b2.

It resulted in "undefined" branch name. Stick with the old method until someone decides its not working for all cases. Sry TheUni - but theory proved wrong ... ;)