After migrating to Gitlab 12, GitlabNet does not have discover method. What's the new way?
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 migrating to Gitlab 12, the GitlabNet class does not have the discover method anymore.
What's the new way to achieve this?