There is a commit policy plugin for Bitbucket server and data center but I can't find anything for cloud. I need to implement a specific format. In order to link our JIRA issues to the commits we're focusing on smart commits. But in order to enforce the smart commit policy I need to set up a gate so I only commit with proper format followed go through.
Hi @Ci Admin ,
I'm afraid that this is not possible in Bitbucket Cloud. We have an option to enforce JIRA issues keys in commit message (it can be found in Repository settings > Links), but we don't support server side hooks at the moment that would allow rejecting commits based on the commit message format.
We have a feature request for a server-side pre-receive hook that you can vote for, add yourself as a watcher and also leave any feedback:
In the meantime, the suggestion I can make as a workaround would be to use client side hooks, you can check an example here:
These will need to be configured by every user in the local clone of the repo they are working on, in the .git/hooks directory of the local repo. From the link I included above:
Because hooks aren’t transferred with a clone of a project, you must distribute these scripts some other way and then have your users copy them to their .git/hooks directory and make them executable.
Please feel free to let me know if you have any questions.
Hi @Ci Admin
Do you use Jira in Cloud as well (at all?) In the off chance that you also use Jira Server or Data Center, you can implement (have your developers install) a local commit verification hook script that would enforce your rules. Read more on this here.
I know it's a cumbersome workaround and only works if you have Jira Server/DC, but it's the best we could come up with until BCLOUD-10471 is not implemented.
Hi everyone, We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events