Hi markewaite, sorry for late response I did not get the email notification.
Any git server have the repository name just because otherwise you can not have different bucket where put diffent code. Anyway I expect is not something that must be extracted from URL but something that implementation of SCMHead.getRepositoryName() must provide.
For what I know about server I used:
repository name: bin
repository name: git-client-plugin
repository name: jenkins-pipeline-utils
repository name: git-client-plugin
repository name: git-client-plugin
repository name: bin
azure repository name: elisp
git server unknow to me
I was asking just because I would avoid to provide a new env variable named like GIT_REPOSITORY_NAME or BITBUCKET_REPOSITORY and than, maybe after 1 year, the git-plugin provides a NEW env variable with the same goal, so, I have to deprecated that one provided by the bitbucket plugin in favour of that one provided by the git-plugin and then, after a while remove it (I already expect lot of bug for this last action).
So if you've considered exposing the repository name but have discarded it, then the bitbucket plugin will contributes to the environment variables with repository name (repo_slug in atlassian terms).
If you've never considered the idea, maybe this is a good opportunity and I'll hold off on the task while I wait for the SCMHead method to be implemented.
PS: Trust me, you have too many repositories, it seems you take the disaster and recovery too seriously 
Hi markewaite , I have a question for you.
This is not the first request of this kind that I have received from users. I have read the environment variables that git-plugin makes available and I was wondering if there was a specific reason why the repository name is not among them.
Currently some users are analyzing the URL used in the git clone to get this value.
The repository is useful when in the pipeline you have to perform some curl to the Bitbucket API (I suppose the same could be for github)