Open tomka opened 12 years ago
I'd love to see this feature merged. Current Post-Receive URLs add some complexity to my workflow (a webpage is run as the webserver user, but I'd like to be executed by the gitolite user, so I had to add a workaround...).
Why does the readme explicitly talk about putting hooks into the individual hooks directory of a repository? Wouldn't it make more sense to put them into the top-level .gitolite/hooks/post-receive.d directory? If I understand gitolite, this directory would then be linked into all new repositories...? Alternatively, perhaps it would make sense to support both global and local configuration with two different directory names..?
Supporting both, global and local extra hooks, sounds reasonable. As I only needed local configurations in the first place, I only came up with this addition. So that is why the readme talks only about individual hook directories. Also, I guess per-repo hooks are pretty common. However, I'll add support for global configurations in the next days to this pull request. I propose to have the directory "post-receive.d" for global hooks (linked automatically for new repos) and "post-reseive.local.d" for individual per-repo hooks.
The latest commit adds support for local and global hooks. The commit message states the details. What do you think about it?
Hello. Thank you for your work. Sorry for the delay.
I have a couple of folks with hook problems at the moment, so I am going to wait until that is resolved... I may put this into version 0.5.2x.
Hi kubitron, thanks for getting back to this and considering it for a merge. I thought about adding the presentation of all available executable hooks in a projects repository settings (and maybe of the global hooks in the plugin's global settings). What's your opinion on this?
I just rebased this code to the most recent master branch (fba1f7e8e5).
As this plugin occupies the post-receive hook of a managed repository, no other post-receive hook can be used. To get around this limitation, this commit changes the installed hook in such a way that it looks for additional executable files in a sub-directory of the repository's hook folder. This sub-directory has to be called "post-receive.d". The plugin's hook will execute all the files in there marked as executable and will provide the processes with the same STDIN stream it got when called in the first place.