The Git::Hooks is a Perl framework for implementing Git/Gerrit hooks. What is the procedure to install and config it to use with Gerrit?
相关问题
- $ENV{$variable} in perl
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Is it possible to pass command-line arguments to @
- Outlook Object Model - Hooking to the Conversation
相关文章
- 请教Git如何克隆本地库?
- Running a perl script on windows without extension
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Comparing speed of non-matching regexp
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
Installation
1) Install dependencies:
Ubuntu:
Red Hat:
2) Install Git::Hooks:
Configuration
0) Be sure you have the hooks plugin installed in Gerrit.
1) Create the Gerrit hooks patchset-created and draft-published (with execution permission) in GERRIT-SITE/hooks directory, with the following content:
2) Configure the Gerrit repositories:
Any repository can be set individually but it's easier to configure all-projects project in GERRIT-SITE/git/all-projects.git/config file like in the following example (some configurations itens can be added/removed as needed):
And then include the all-projects config in all repositories by adding the folling at GERRIT-SITE/git/REPO.git/config
If needed any configuration can be changed/added at some specific repository changing the GERRIT-SITE/git/repo.git/config like in the following example (some configurations itens can be added/removed as needed):
To learn more about Git::Hooks configuration options see here.
3) Restart the Gerrit server