Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does Bitbucket Cloud support git pre-receive hooks?

Johnathan Gilday November 28, 2018

I would like to configure a Bitbucket Cloud git repository with a pre-receive hook. Is this possible?

2 answers

1 accepted

1 vote
Answer accepted
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2018

It is not currently possible.

Johnathan Gilday November 28, 2018

@jredmond are there plans to add this feature such that I could watch a feature request issue for updates?

jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2018
Simran December 13, 2021

+1 Need this

Like Christian Hofstätter likes this
1 vote
Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 15, 2019

Hi @Johnathan Gilday 

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!) 

_abhishekgarg November 21, 2019

Better Commit Policy for Bitbucket seems to be supported only in Server / Datacenter and not in Cloud.

Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 21, 2019

Hi @_abhishekgarg 

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.

Walter Davies February 16, 2023

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. 

Like # people like this
Newthon Junior January 8, 2024

@Levente can I force the developers to install hooks when clones the repository?

Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 9, 2024

@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!

Newthon Junior January 9, 2024

@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.

Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 10, 2024

@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.

midori-global-jxec-Pull-Request-1046-JXAC-All-changes-—-Bitbucket.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events