gitlabgitlab-cigitlab-omnibus

Change "View merge request for $branch" post push message in Gitlab


Using a self hosted gitlab instance, how can I modify this message that I get after pushing to the repository, on my git client side ?

git push
[...]
remote: 
remote: View merge request for MYBRANCH:
remote:   https://GITLAB_MR.URL
remote: 

I tried checking the server side hooks of my omnibus installation in

/var/opt/gitlab/git-data/repositories/@hashed/MY_REPO_HASH

But I cant find any hook with this message there using grep -Hrn "View merge request"

Is this message not from a git hook ? How to configure it ?

If I cannot change it without modifying Gitlab's code, how can I add text there for pushers to read ?


Solution

  • As pointed out, this can only be done by modifying Gitlab's code and not by user configuration as of today.

    I found the source of the message here : https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/internal_post_receive/response.rb

    Of course most users wouldn't find this solution pratical.