Fetches Jira tasks assigned to the current user, lets you pick one, and builds a branch name from it.
go run ./taskbranch
# Or if installed
taskbranchThe script will:
- fetch your assigned Jira tasks
- let you select a task
- let you select a branch type
- print the final branch name
Example output:
$ taskbranch
Assigned tasks:
1. PROJ-123 - Add login page [In Progress]
2. PROJ-456 - Fix redirect bug [To Do]
Select task [1-2]: 1
Branch types:
1. feat
2. fix
3. chore
4. custom
Select branch type [1-4]: 1
feat/PROJ-123-add-login-pagetaskbranch --type fix
taskbranch --jql "assignee = currentUser() AND project = PROJ ORDER BY updated DESC"--typeskips the branch type prompt--jqloverrides the default Jira query
git checkout -b "$(taskbranch)"