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

Reject commits based on certain conditions?

Aaron Patterson January 17, 2022

Hi, I want to have the ability to reject commits to our Bitbucket Cloud repository based on conditions we define - e.g. if somebody tries to commit code which has syntax errors we would run it through a linter at the time of commit and reject it.

With Git this could normally be accomplished via pre-receive hooks on the server, but I don't see a way to use those in Bitbucket Cloud.

Git also supports pre-commit hooks where this could be done on a local repository, but I don't know if there is a way in which we could implement that in our Bitbucket repository and then have it be "inherited" by existing cloned copies.

What are my options here?

1 answer

0 votes
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 17, 2022

Hi @Aaron Patterson , welcome to the community!

I understand that you would like a bitbucket cloud server-side pre-commit checker that would validate commits pushed to remote.

Unfortunately there is no such functionality in BB Cloud that would match the repo pre-commit hooks we all use & love in Bitbucket server.

Here is the ticket https://jira.atlassian.com/browse/BCLOUD-10471 to have the added to BB cloud. Please vote and lobby in your channels to get this implemented by the Atlassian BB Cloud team.

Best, Ulrich

Aaron Patterson January 17, 2022

Thanks Ulrich, I've added my vote in support of this feature!

I see that the feature has ~657 votes, is assigned to an inactive owner, and has been open without action from Atlassian for 7 years. That's quite a long time to ignore the expressed preference of hundreds of users.

What with this being a very basic feature supported by Git itself and by competitors like Github, this seems like a strong indicator that we should terminate our use of Bitbucket and switch to a competitor. Based on this we've decided to start evaluating our alternatives this week. Do you (or anyone) know of any resources that would assist us in migrating away from Bitbucket?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events