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?
I don't think it's gonna work.
We have a Bitbucket app, very similar functionality (commit policy enforced) and the Bitbucket editor does not call the corresponding handlers. At least, it was the status some months ago.
Hmm that's a pity. And I don't want to disable the editor because it's useful for some other projects.
Maybe we should use a CI plan instead.
Thanks for your answer!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may want to accept the answer so that future visitors can see if it was correct even if not an actual solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.