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
-
gitaly-proto!75 (merged) (reviewer: @DouweM) -
gitaly!299 (merged) (reviewer: @jacobvosmaer-gitlab) -
gitlab-workhorse!185 (closed)gitlab-workhorse!192 (merged) (reviewer: @jacobvosmaer-gitlab) -
gitlab-shell!158 (merged) (reviewer: @nick.thomas)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
- Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
Edited by David Turner (TS)