My questions might sound silly at first but here is what I want to achieve:
Currently we are using a custom pre-receive script written in Perl which does some syntax checking on our pushed files. It has been put in each repository's hooks/post-receive.d/ directory on the Bitbucket server. This is being provisoined by Puppet and works just fine.
HOWEVER users can bypass this hook by using the online Bitbucket editor. Pre-receive hooks are only being triggered on a push. And committing with the online editor does not involve any push.
So I thought I could fix this by using the same script as pre-commit hook on the server side. But apparently pre-commit scripts are not being triggered either when using the online editor.
I know pre-commit hooks are meant to be used client-side but how I see it Bitbucket server is the client when using the online editor.
Anyone knows how to achieve this?