Skip to content

Add GL_USERNAME environment variable for hooks

What does this MR do?

Some git hooks would like to know which user is doing the operation (e.g. push). GitLab currently has GL_ID, which is almost useful, but this requires a round-trip to the server to retrieve the username (and management of an access token for this purpose). But since GitLab already has the user name, we can simplify this process. So this MR sets GL_USERNAME to the user's username while running the git hooks. This allows hooks to differentiate based on who is doing the operation.

Pre-requisites

Does this MR meet the acceptance criteria?

Edited by username-removed-1230272

Merge request reports