Browser bookmarklet to generate normalized git branch names from Jira issues.
- Extracts issue key, title, and epic name from Jira pages
- Generates branch names using AI (n8n webhook) or locally
- Auto-detects issue type (incident →
bugfix/, other →feature/) - Caches generated branch names in localStorage
- Toast notifications for status feedback
- One-click copy to clipboard
npm installCopy .env.example to .env and configure:
# URL where branch-generator.js is hosted
BASE_URL=https://your-domain.com/path
# n8n webhook for AI branch generation (optional)
N8N_WEBHOOK_URL=https://your-n8n-instance.com/webhook/branch-generator
JWT_SECRET=your-jwt-secret-key
# S3 upload configuration
S3_ACCESS_KEY_ID=your-access-key
S3_SECRET_ACCESS_KEY=your-secret-key
S3_REGION=ocdn
S3_ENDPOINT=https://ocdn.eu/
S3_BUCKET=bucket-name
S3_BASE_PATH=folder/subfolder| Command | Description |
|---|---|
npm run dev |
Start dev server with hot reload |
npm run build |
Build for development |
npm run build:prod |
Build for production (minified) |
npm run upload |
Upload build files to S3 |
npm run deploy |
Build production + upload to S3 |
- Run
npm run deployto build and upload to S3 - Copy content of
build/loader-bundled.js - Create new bookmark in browser with the copied content as URL
- Open a Jira issue and click the bookmark
- Branch name is copied to clipboard
src/
├── index.js # Main entry point
├── loader.js # Bookmarklet loader
└── modules/
├── config.js # Configuration constants
├── api.js # n8n webhook API
├── branch.js # Branch name generation
├── clipboard.js # Clipboard operations
├── jira.js # Jira data extraction
├── storage.js # localStorage cache
└── toast/
├── index.js # Toast notifications
└── styles.js # Toast CSS styles
Generated branch format: {prefix}/{ISSUE-KEY}-{epic}-{title}
| Issue Type | Prefix |
|---|---|
| Incident / INC-* | bugfix/ |
| Other | feature/ |
Example: feature/ABC-123-epic-name-issue-title
build/
├── loader-bundled.js # Bookmarklet (with javascript: prefix)
└── branch-generator.js # Main script (hosted on S3)
MIT