简体   繁体   中英

How to enable gerrit hooks?

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 ?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM