From e84145b23cc4dfb51ebc720dab0425041c23ae77 Mon Sep 17 00:00:00 2001 From: YIZIHN Date: Tue, 25 Jun 2024 15:24:15 +0900 Subject: [PATCH] Update create-jira-issue.yml --- .github/workflows/create-jira-issue.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index bc6aaf9c..9c536e95 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -64,16 +64,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export LANG=en_US.UTF-8 ISSUE_NUMBER=${{ github.event.issue.number }} ISSUE_TITLE="${{ github.event.issue.title }}" - PREFIX=$(echo "$ISSUE_TITLE" | grep -oE '^(feat|fix|docs|setting|add|refactor|chore)') - if [ -z "$PREFIX" ]; then PREFIX="feature"; fi - TITLE_NO_PREFIX=$(echo "$ISSUE_TITLE" | sed -e "s/$PREFIX : //") - # iconv를 사용하여 비ASCII 문자 제거 - CLEAN_TITLE=$(echo "$TITLE_NO_PREFIX" | iconv -c -f utf-8 -t ascii//TRANSLIT) - # ASCII가 아닌 문자 제거 - CLEAN_TITLE=$(echo "$CLEAN_TITLE" | sed 's/[^a-zA-Z0-9]//g') + # 접두사 추출 및 이슈 타이틀에서 접두사 제거 + PREFIX=${ISSUE_TITLE%% :*} + CLEAN_TITLE=${ISSUE_TITLE#*: } + CLEAN_TITLE=${CLEAN_TITLE// /-} # 공백을 하이픈으로 대체 BRANCH_NAME="${PREFIX}/#${ISSUE_NUMBER}-${CLEAN_TITLE}" git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com"