Skip to content

Commit 839bfcf

Browse files
committed
Init Project
1 parent 4729ee8 commit 839bfcf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/auto-branch.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ jobs:
2424
- name: Create branch from issue
2525
run: |
2626
issue_number=${{ github.event.issue.number }}
27-
issue_title=${{ github.event.issue.title }}
28-
29-
safe_title=$(echo "$issue_title" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-')
30-
branch_name="issue/${issue_number}-${safe_title}"
27+
issue_title="${{ github.event.issue.title }}"
28+
29+
# 콜론(:) 앞 단어를 prefix로 추출
30+
prefix=$(echo "$issue_title" | cut -d':' -f1 | tr -d '[:space:]')
31+
32+
branch_name="${prefix}/${issue_number}"
33+
3134
echo "📌 Creating branch: $branch_name from origin/main"
32-
35+
3336
git fetch origin main
3437
git checkout -b "$branch_name" origin/main
3538
git push origin "$branch_name"

0 commit comments

Comments
 (0)