Better comment the hooks
There seems to be some confusion over how to use hooks now that we symlinked the directory https://github.com/gitlabhq/gitlab-shell/issues/188
These comments should make things more clear.
Merge request reports
Activity
@dzaporozhets Please review carefully, I'm just guessing most of this stuff based on your comments.
Added 1 new commit:
- 2892d414 - Put before exit so it is executed.
@sytses This is a great start. However, this still leaves a poor upgrade path and does not address project specific hooks - users will still need logic in each custom hook to check if project is 'x' or it will execute all.
For a slight variation on this may I suggest we create 2 custom hook directories - pre-receive/post-receive? Users can drop a file in either directory named
namespace_repo
and it will be automatically picked up and executed if the project equals the filename? (obviously with the slash between namespace transformed). You could also have sub-dirs for each namespace if that makes management more straightforward.@dzaporozhets What do you think about this proposal?
I mocked up a quick proof of concept in https://github.com/gitlabhq/gitlab-shell/pull/190
@dzaporozhets let me know if you think this might be of interest. I believe it solves my problems as well as other users I've heard from since the hooks directory changed to a symlink.
Thanks @dblessing
@dzaporozhets your call
I like https://github.com/gitlabhq/gitlab-shell/pull/190 so lets proceed with it