Jira Issue Integration
worktree can derive branch names directly from Jira issues in your Jira workspace.
Basic Usage
worktree branch --jira DEV-123
worktree branch --jira dev-123The generated branch name is shown as the default in the prompt, so you can accept it or edit it before creation.
How Branch Names Are Built
- Read issue type and summary from the Jira API.
- Sanitize the summary into a branch-safe slug.
- Optionally prepend a configured prefix based on issue type.
Supported issue-type prefix mapping:
Feature,Story, and other non-bug/chore types ->branchPrefix.featureBug->branchPrefix.bugfixTask->branchPrefix.chore
If a prefix key is not configured, no prefix is applied.
Authentication Resolution
Authentication is resolved in this order:
- Existing
jira.host,jira.email, andjira.apiTokenin local git config. - Interactive prompts for missing values, then save to local git config.
Suggested Setup
worktree config jira.host https://your-domain.atlassian.net
worktree config jira.email your-email@example.com
worktree config jira.apiToken <api-token>
worktree config branchPrefix.feature feature/
worktree config branchPrefix.bugfix fix/
worktree config branchPrefix.chore chore/You can also configure only missing values:
worktree config --missing --names jira.host,jira.email,jira.apiToken,branchPrefix.feature,branchPrefix.bugfix,branchPrefix.choreGetting a Jira API Token
- Visit Atlassian Account Settings
- Click “Create API token”
- Copy the generated token and use it with
worktree config jira.apiToken
The token is stored locally in git config and never sent anywhere except to your Jira instance.
Last updated on