Hi, I´m trying to develop a pre-receive hook that do some work if the user who pushed the changes is a Jenkins-user.
I tried getting the current user from a AuthenticationContext but that doesn´t give me the user who initiated the hook. E.g if i change the user info in tortoiseGit-gui the user info does not change in the AuthenticationContext, and if I push to a local bitbucket server it says “admin” instead of my git user name.
So how can I get the user name from the user who pushed the changes?
Thanks in advance!