I have started using Gerrit 2.16 as code review tool and want to configure server side hooks to validate the git commit message when a change is committed/pushed to gerrit.
Tried using hooks by copying scripts to $GIT_DIR/hooks (scripts like ref-update, patchset-created, change-merged), gave permission on the gerrit server but nothing works.
commit-msg hook can be enabled on local repository by using command give in gerrit UI
example: git clone ssh://@:29418/Project1 && scp -p -P 29418 @:hooks/commit-msg /.git/hooks/
change_ID will be automatically generated if this hook is enabled.
This script commit-msg gets downloaded to local repository when above command is executed.
My question; can we find path of this script on the gerrit server, so that I can modify and enforce git commit message validation?
Or is there any other way to enable gerrit server side hooks?