Open gabyx opened 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
[x]
):Description
When gitea creates a new repo, the following happens
git init --bare
init.templateDir
. Assume there are${init.templateDir}/hooks
which get installedhooks
(it does not look atcore.hooksPath
which is good).This overwritting behavior is problematic. It is clear that gitea needs to install the hooks somewhere, and thats not so trivial, since the admin (as me) could have setup a global hooks dispatcher (see https://github.com/rycus86/githooks)
A better strategy would be to call a customizable setup script which is run after gitea has created the bare repo. The default implementation is exactly as today, but so that we can adapt this script. A
git config --global core.hooksPath
should not be supported because it's the same for all repositories, gitea wants the flexibiliy to edit/save hooks from the web-interface fo each repository and needs to place them best in the repository's ownhooks/update.d
(etc..) folder...This means the
setup-script.sh
is called likeIn this way we can replace the initial hooks of gitea, replace them with the global hooks dispatcher and incorporate the gitea hooks.