Could it be that this is the solution?
http://stackoverflow.com/questions/42798006/how-to-disable-automatic-build-from-scm-change-in-jenkinsfileThe flow in my case is:
PR to GHE > GHE sends pull_request webhook to Jenkins > Jenkins uses the Jenkinsfile to run unit tests > Jenkins makes a call to merge the PR to the master branch.
The merge to the master branch is essentially a push webhook, so: GHE sends a push webhook to Jenkins > Jenkins uses the same Jenkinsfile to run again unit tests > there is logic to not-merge in case the branch is the master branch > Instead publish to npm > bump the version number > commit & push to git.
This time because the the whole thing worked from a checkout of the master branch and not based on a PR, the option to "Suppress automatic SCM triggering" should hopefully stop the loop from starting...