Preferred way to access git environment variables on PreRepositoryHook

Hi,

What’s the preferred (or even working way) to access git environment variables on PreRepositoryHook code? I’m utilizing git push-options and on Bitbucket Server 5.x the needed environment variables were available through ScmHookDetails.getEnvironment(). That being removed on 6.x I have yet to find working way for accessing the variables.

Any ideas or recommendations?