forked from redmine-git-hosting/redmine_git_hosting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_hooks.rb.example
38 lines (38 loc) · 1.26 KB
/
custom_hooks.rb.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# You can declare here you own hooks to install globally in Gitolite.
# You must set the source directory of the files with the *source_dir* method and
# declare your hooks with *gitolite_hook* method.
#
# *RedmineGitHosting::GitoliteHooks.register_hooks* can be called multiple times
# with a different *source_dir*.
#
# *name* : the hook name (just a name to identify the hook)
# *source* : the source path concatenated with *source_dir*
# *destination* : the destination path on Gitolite side.
#
# The *destination* must be relative.
# The final destination will depend on your Gitolite version :
#
# Gitolite v2 : <gitolite_home_dir>/.gitolite/hooks/common
# Gitolite v3 : <gitolite_home_dir>/local/hooks/common/
#
# RedmineGitHosting::GitoliteHooks.register_hooks do
# source_dir '/tmp/global-hooks'
#
# gitolite_hook do
# name 'global/check-branch'
# source 'pre-receive/check_branch.rb'
# destination 'pre-receive.d/check_branch.rb'
# executable true
# end
# end
#
# RedmineGitHosting::GitoliteHooks.register_hooks do
# source_dir '/tmp/custom-hooks'
#
# gitolite_hook do
# name 'custom/notify-users'
# source 'post-receive/notify_users.rb'
# destination 'post-receive.d/notify_users.rb'
# executable true
# end
# end