A Chrome extension that adds a button to Azure DevOps work items for generating and copying standardized git branch names.
- Adds a branch icon button to the Azure DevOps work item command bar
- Automatically generates branch names in the format:
AB#<id>-<title> - Truncates long titles to 50 characters
- Works with dynamic page loads and board navigation
- Provides visual feedback when branch name is copied
- Maintains consistent position in the UI next to standard Azure DevOps controls
-
Download the Extension Files Create a new directory containing these files:
manifest.json- Extension configurationcontent.js- Main extension logicstyles.css- Styling for the button
-
Load in Chrome
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" using the toggle in the top right corner
- Click "Load unpacked"
- Select the directory containing your extension files
- Open Chrome and navigate to
-
Verify Installation
- Navigate to your Azure DevOps board
- Open any work item
- You should see a new branch icon button in the command bar
- Click the button to copy the formatted branch name
- Open any work item in Azure DevOps
- Locate the branch icon button in the command bar (next to Save, Follow, etc.)
- Click the button to copy the branch name
- The button will briefly display "Copied!" to confirm the action
- Paste the branch name wherever needed
The extension generates branch names following this format:
- Prefix:
AB#<id>- - Title: Up to 50 characters of the work item title
- Special characters are removed
- Spaces are replaced with hyphens
- All text is converted to lowercase
Example:
Original: Work Item #46600: "Update scheduler impersonation page to show all managers"
Generated: AB#46600-update-scheduler-impersonation-page-to-show-all
If the button doesn't appear:
- Refresh the page
- Check if Developer mode is enabled in Chrome extensions
- Verify the extension is enabled
- Check the browser console for any error messages
If the button appears but copying fails:
- Check the browser console for error messages
- Ensure the work item has loaded completely
- Verify clipboard permissions are enabled for the extension
To modify the extension:
- Make changes to the source files
- Navigate to
chrome://extensions/ - Click the refresh icon on the extension card
- Reload any Azure DevOps tabs to see the changes
Common customization points:
- Branch name format in
createGitBranchName() - Button styling in
styles.css - Position/order in the command bar (adjust the
orderCSS property)
manifest.json: Extension configuration and permissions
{
"manifest_version": 3,
"name": "Azure DevOps Git Branch Generator",
"version": "1.0",
"description": "Copies formatted Git branch names from Azure DevOps tickets",
"permissions": ["clipboardWrite"],
"content_scripts": [
{
"matches": ["*://*.visualstudio.com/*", "*://dev.azure.com/*"],
"js": ["content.js"],
"css": ["styles.css"]
}
]
}styles.css: Button styling
.git-branch-button {
height: 32px;
padding: 0 8px;
margin: 0 4px;
background: transparent;
border: none;
cursor: pointer;
color: rgb(49, 49, 49);
display: inline-flex;
align-items: center;
}
.git-branch-wrapper {
order: 3 !important;
}
.bolt-expandable-button {
order: 4 !important;
}To update the extension:
- Make your changes
- Reload the extension in Chrome
- Test thoroughly with different work items and navigation patterns
Feel free to modify and use this extension according to your needs.
For issues or feature requests:
- Check the browser console for error messages
- Verify the Azure DevOps page structure hasn't changed
- Ensure all permissions are correctly set