Hello
today we are running "plain-git" installation with some shell scripts, which help us to procure standardised git repositories with specific update-hooks. Those hooks validate the author entry in a git-commit and deny them if they do not match ldap-entries. We found the "Enforce Author Hook for Stash"-PlugIn which would provide a simliar functionality, but we need to activate it for every new repository, which is error-prone. Is there a possiblity in Stash to provide a "template"-configuration, so new created repository has the same hooks enabled with the same configuration?
Hi Igor,
Unfortunately this feature is not yet available in Stash, though you can track its progress here:
https://jira.atlassian.com/browse/STASH-3597
by watching it and casting your vote there. For your reference this is how new features are prioritized in Stash:https://confluence.atlassian.com/display/STASH/New+features+policy
Thanks,
Gurleen
If it's native git hooks you want to add to newly created repositories you can just add them to:
/usr/share/git-core/templates/hooks
or
C:\Program Files\Git\share\git-core\templates\hooks
depending on system, and they'll be added to repos inited by Stash.
/David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to repeat a comment that's on the Stash-3597 issue above. If you do decide to add hooks to the default templates directory, make sure they're in a post-receive.d or pre-receive.d directories. Stash needs to hijack the normal files and if they get overriden by Git then Stash will stop behaving as expected. That said what would most likely happen is that Stash would override your default hooks every time, which wouldn't be desirable either.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.