Unable to discover user data in update hook during push operation

Hi everyone,

I have custom hooks which validate specific rules based on name of the user who’s pushing code to the server. Before migrate to Gitlab 12, my hooks worked this way:

...
key_id    = ENV.delete('GL_ID')
require '/opt/gitlab/embedded/service/gitlab-shell/lib/gitlab_net'
api = GitlabNet.new
user = api.discover(key_id) # here I can get user['name'] 
...

After migrate to Gitlab 12, the GitlabNet class does not have the discover method anymore.

Is there another way to achieve this?

Hi,

since there was a transition to Gitaly, you probably need to investigate over there.

I’d recommend adding your use case to this working issue:

Cheers,
Michael