Skip to content

Tampermonkey script to customize the branch name while creating a new branch with BitBucket.

License

Notifications You must be signed in to change notification settings

mlegait/tampermonkey-bitbucket-custom-branch-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Customize the branch name generated by BitBucket

Purpose of the script

When you create a new branch using Jira and BitBucket, the branch name is automatically filled by BitBucket.

Today you can't change the naming convention: https://jira.atlassian.com/browse/JRASERVER-40549

Naming convention

This Tampermonkey script customize the default branch name to respect the following naming convention:

Template Example
Story or Task features/<issue_code>/branch_name features/T2UI-52/tbar_rwd_without_adaptive_design
Sub-task subtasks/<parent_issue_code>/<subtask_code>/branch_name subtasks/T2UI-52/T2UI-112/tbar_logic_display (if the parent user story is T2UI-52)
Sub-bug* patches/<parent_issue_code>/<subbug_code>/branch_name patches/T2UI-52/T2UI-396/tbar_price_should_not_be_blue (if the parent user story is T2UI-52)
Bug patches/<issue_code>/branch_name patches/T2UI-49/price_should_be_right_aligned

* Sub-bug is a custom issue type created to handle bugs found once the dev is done but before the story is merged.

As the parent issue code is not written in the URL, it's impossible to retrieve it automatically. So the script add the placeholder <parent_issue_code>. It has to be replaced manually.

How to use it

  1. Install in your browser the Tampermonkey extension : http://tampermonkey.net/
  2. Add in Tampermonkey the customBranchName.js script
  3. Open the issue in Jira
  4. Click on the + Create branch button
  5. Thanks to the script, the branch name will be the good one. Just click on the Create branch button

About

Tampermonkey script to customize the branch name while creating a new branch with BitBucket.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published