Determine the URL for a SCM trigger from inside the build
Some bad news and some good news :)

Bad news:

not a bug. this is a feature (default behaviour)

I don't understand why this bug is still open, either regression, or miscommunication.

Good news:

During setup of Global Shared Libraries jenkins allows to mark whether you should trigger user jobs upon changes in the library.
And, you can also mark this during library usage in the job's groovy.

Please refer to:


https://issues.jenkins-ci.org/browse/JENKINS-41497
https://stackoverflow.com/questions/46819344/jenkins-shared-groovy-library-git-merge-triggering-jobs