Accessing GitLab API from custom git hook?

8 views
Skip to first unread message

Matthias Welwarsky

unread,
Sep 24, 2017, 4:17:53 AM9/24/17
to GitLab
Hi,

it seems to be a problem frequently appearing, but I have not found a definitive answer to it so far:

I need to match the committer with the authenticated GitLab user that actually performs the git push.
I've seen fragments of solutions with people using HTTP directly to access internal GitLab APIs and then decoding
the JSON response in the hook, but I'm wondering if there is not a method to directly perform that
task in ruby? I'm using a GitLab docker image and there is not much inside but what is necessary to run
GitLab itself, so preferrably I'd be using the embedded ruby stack and available gems.

Best regards,
Matthias
Reply all
Reply to author
Forward
0 new messages