I'm trying to use this plugin:
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Integration+Plugin
which should export a variable GITHUB_PR_NUMBER, that corresponds to the branch GitHub is using for pull-requests.
The installation instructions say to add this to the refspec:
+refs/pull/${GITHUB_PR_NUMBER}/merge:refs/remotes/origin/pull/${GITHUB_PR_NUMBER}/merge
And this to the branch specifier:
origin/pull/${GITHUB_PR_NUMBER}/merge
However this variable does not expand at all. BUILD_NUMBER seems to expand fine, though.
Not sure what's wrong with my Jenkins setup.