File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,23 @@ jobs:
3737 - name : Create branch
3838 run : |
3939 ISSUE_NUMBER=${{ github.event.issue.number }}
40- ISSUE_TITLE=${{ github.event.issue.title }}
41- SANITIZED_TITLE=$(echo "$ISSUE_TITLE" | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')
42-
43- BRANCH_NAME="${{ steps.prefix.outputs.prefix }}/${ISSUE_NUMBER}-${SANITIZED_TITLE}"
40+ ISSUE_TITLE="${{ github.event.issue.title }}"
41+
42+ # 영어/숫자만 남기고, 나머지는 - 로 치환
43+ SANITIZED_TITLE=$(echo "$ISSUE_TITLE" | iconv -t ascii//translit | tr '[:upper:]' '[:lower:]' | tr -cs 'a-z0-9' '-')
44+
45+ if [ -n "${{ steps.custom.outputs.custom_name }}" ]; then
46+ BRANCH_NAME="${{ steps.prefix.outputs.prefix }}/${ISSUE_NUMBER}-${{ steps.custom.outputs.custom_name }}"
47+ else
48+ BRANCH_NAME="${{ steps.prefix.outputs.prefix }}/${ISSUE_NUMBER}-${SANITIZED_TITLE}"
49+ fi
50+
4451 echo "Creating branch: $BRANCH_NAME"
45-
52+
4653 git config user.name "github-actions[bot]"
4754 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
48-
49- git fetch ${{ github.event.repository.default_branch }}
50- git checkout -b "$BRANCH_NAME" origin/main
55+
56+ DEFAULT_BRANCH=${{ github.event.repository.default_branch }}
57+ git fetch origin $DEFAULT_BRANCH
58+ git checkout -b "$BRANCH_NAME" origin/$DEFAULT_BRANCH
5159 git push origin "$BRANCH_NAME"
You can’t perform that action at this time.
0 commit comments