Skip to content

Instantly share code, notes, and snippets.

View eran-tego's full-sized avatar

eran-tego

  • Joined Oct 31, 2025
View GitHub Profile
@eran-tego
eran-tego / gist:ec44ca890ac736531b3a9c263edd7062
Created November 2, 2025 14:56
create branch name for here
# 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}"