Details
-
Suggestion
-
Resolution: Unresolved
Description
Bitbucket should support a configurable pre-commit hook. In fact, bitbucket should support all client side hooks.
NOTE: I am not referring to a pre-receive or a post-receive server-side hook.
The rational provided by Atlasian for not allowing hooks is that it would allow people to run arbitrary code on their servers. However, I do not see a reason to prevent any client side hooks from being configured.
Possible workaround:
This workaround allows for all git clones with a working directory of this repository to use the same hooks. This hook would not be used in Bitbucket. git 2.9 allows for configuration of the hook path. Configuring the hook path allows for hooks to be shared.
- Make sure all clients are at git 2.9 or better.
- configure each git to use the hook path:
- git config core.hooksPath .githooks
- Create .githooks folder in the repository and put hooks in that folder.