This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add this to ~/.zprofile | |
| hero-create-branch() { | |
| issue_num=$1 | |
| issue_title=$(gh issue view $issue_num --json title -q .title) | |
| # Convert to lowercase, replace non-alphanumeric with -, and collapse multiple dashes | |
| suffix=$(echo "$issue_title" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g' | sed -E 's/^-|-$//g') | |
| branch_name="HERO-${issue_num}/${suffix:0:100}" |