The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to restrict the naming of branches

Toan Luu Nguyen
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!
November 24, 2024

Hello,

Our team would like to follow best practices to name our branches based on certain rules like it should start with the developer's userid, followed by the Jira number, followed by Jira's title or short description of the Jira, e.g.,

th01552/RX25-Add-New-Search-Dialog

Is there a way to set that up via repository permissions and/or branch permissions, or some other methods.

Thank you.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Saxea _Flowie_
Atlassian Partner
November 24, 2024

Hi @Toan Luu Nguyen

If you are using Bitbucket Cloud, currently Flowie and addon we provide, supports merge checks to validate the branch name using a regex and custom logic for PRs. Jira integration, which would support your scenario is being developed and is coming early next year. This only blocks the PR though.

If you want to prevent branches from being created incorrectly on remote at push time, since Bitbucket cloud has no support for server-side Git hooks, you could implement it via a Git hook on the client side. Once the Jira integration is in place, we also intend to add support to validate at push/commit time for a better developer experience.

If you are using Bitbucket DC, Better Commit Policy for Bitbucket might be what you are looking for.

Please feel free to contact us at support@flowie.app, mentioning this thread, and we can assist you with any queries you might have.

-Renato

TAGS
AUG Leaders

Atlassian Community Events