I would like to configure a Bitbucket Cloud git repository with a pre-receive hook. Is this possible?
It is not currently possible.
@jredmond are there plans to add this feature such that I could watch a feature request issue for updates?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can vote for and watch https://bitbucket.org/site/master/issues/10471/git-server-side-pre-receive-hook-bb-11418
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes @Johnathan Gilday you can vote on https://bitbucket.org/site/master/issues/10471/git-server-side-pre-receive-hook-bb-11418 and wait for 10 years.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As an alternative, until Atlassian delivers this, you can give Better Commit Policy for Bitbucket a try! It allows you to install local hooks, so you can verify commit right on the developers' computer at commit time. As long as it's consistently used across the developer team, it can work as an alternative to a server-side hook.
(Please note that the app relies on Better Commit Policy for Jira!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Better Commit Policy for Bitbucket seems to be supported only in Server / Datacenter and not in Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that's why I mentioned local hooks, as a workaround (and that it relies on Better Commit Policy for Jira Server) until Atlassian delivers pre-receive hooks. As long as the local hooks are consistently used across the developer team, it can work as an alternative to a server-side hook.
So it's not yet available to be directly installed on Bitbucket Cloud, and Bitbucket Cloud also doesn't allow you to configure pre-receive hooks. You can read more about how this workaround can work here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yet another feature I've used on multiple other platforms since at least 2012 that's not available in Bitbucket. I really can't be bothered to "vote" for issues I take for granted in anything else that considers itself to be "Enterprise".
* Note: I edited this reply. To make it better. Take a hint, Bitbucket maintainers.
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.
@Newthon Junior I don't think you can force individual developers to install hooks in their local repositories. There are ways to communicate or make it part of the team habits, etc.
With that said, we at Midori started working on the cloud version of Better Commit Policy for Bitbucket. It will not be identical to how the on-premise version works, but it will give you ways to control what gets merged into a central repository.
If you or anyone out there is interested in participating in the beta program, reach out to me at levente.szabo@midori-global.com!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Levente Szabo Communicating doesn't always work and being part of the team's habit takes time. Atlassian doesn't cares about the aeronautical standards (DO-178C for example) so it is very difficult for companies that need to follow these standards to work with Bitbucket. Features like these are not nice to have for these companies, they are must to have. Guaranteeing through process that something must be done by the developer does not mean that he will do it and if he does not do it, the company becomes non-compliant with the standard and runs the risk of not certifying the software.
Like @Walter Davies said, we can't be bothered to "vote" for issues and we can't wait for 9+ to have a feature implemented while it is on multiple other platforms since at least 2012.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Newthon Junior Trust me, I understand. We've been supporting members of the defense, banking, aviation and similar mission-critical industries in their code change compliance needs for many years. We have also been pushing Atlassian on this front, without much success. But rest assured that it won't take 9 years for us to release something, see a sneak peek screenshot below :)
So I encourage you to shoot me an email at levente.szabo@midori-global.com so I can keep you in the loop.
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.