Reputation: 833
I am running gerrit
on dockers
. I am trying to use the patchset-created
hook in gerrit. But am stuck in the initial step itself.
When gerrit is initialized in the GERRIT_SITE
directory, I cannot find the hooks
directory present there where the patchset-created
hook should be present.
I later installed gerrit
on my local machine itself, thinking probably dockers
is the problem. Still, I cannot find the hooks
directory except the one present in the git
folder which is a part of git-hooks. The document is not clear on how to configure hooks
.
I need some guidance regarding how to get the hooks
folder? How to enable it? If any changes are to be made to gerrit.config
?
Upvotes: 0
Views: 1568
Reputation: 37620
You simply have to create the hooks/
directory and place the (executable) patchset-created
file in there. IIRC you have to start Gerrit afterwards.
mkdir
is the magic command, but I guess that you know it.
You can btw. also configure Gerrit to search for hook files in a different directory in the [hooks]
section of gerrit.config
.
Upvotes: 2