Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can we apply pre-receive hooks in bitbucket cloud

ankush
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 11, 2023

We are woking on implementing pre-commit guidelines(ex:  Adding comments format to the commit) for all the commits done by developers into the repositories. 
While trying to find the pre-commit hooks in the repositories setting i couldn't find any hooks options. Could you please guide us for the same ? 

Also, if there is any workarounds for this please let us know. 

1 answer

1 vote
Saxea _Flowie_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2023

There is no support for server-side hooks. There's a feature request here.

However, you can implement client-side hooks. You can optionally use tools like Husky or Overcommit that help manage the hooks.

Client-side hooks can be bypassed if misconfigured or maliciously, so it's not guaranteed. If you want to detect that the client didn't work with a check on the server, Flowie (a Bitbucket app we maintain) can create merge checks to prevent PRs with issues from being merged.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events