Skip to content

Commit 89a013a

Browse files
authored
Merge pull request #12 from prgrms-web-devcourse-final-project/chore/EA3-76-BE-github-actions
[EA3-76] chore: 깃허브 이슈 라벨 매핑 변경
2 parents a3e70a2 + ed70bb6 commit 89a013a

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/ISSUE_TEMPLATE/issue-form.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body:
4242
description: '이슈의 성격에 맞는 라벨을 선택해주세요'
4343
multiple: false
4444
options:
45-
- feat
45+
- feature
4646
- fix
4747
- docs
4848
- style

.github/workflows/create-jira-issue.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
LABEL="${{ steps.issue-parser.outputs.issueparser_label-selection }}"
5555
case "$LABEL" in
5656
fix) JIRA_ISSUETYPE="버그" ;;
57-
feat|docs|style|refactor|test|chore) JIRA_ISSUETYPE="Task" ;;
57+
feature|docs|style|refactor|test|chore) JIRA_ISSUETYPE="Task" ;;
5858
*) JIRA_ISSUETYPE="Task" ;;
5959
esac
6060
echo "JIRA_ISSUETYPE=$JIRA_ISSUETYPE" >> $GITHUB_ENV
@@ -87,7 +87,7 @@ jobs:
8787
run: |
8888
LABEL="${{ steps.issue-parser.outputs.issueparser_label-selection }}"
8989
case "$LABEL" in
90-
feat) TYPE="Feature" ;;
90+
feature) TYPE="Feature" ;;
9191
fix) TYPE="Fix" ;;
9292
docs) TYPE="Docs" ;;
9393
style) TYPE="Style" ;;
@@ -98,6 +98,21 @@ jobs:
9898
esac
9999
echo "TYPE=$TYPE" >> $GITHUB_ENV
100100
101+
- name: Map label to custom GitHub label
102+
run: |
103+
RAW_LABEL="${{ steps.issue-parser.outputs.issueparser_label-selection }}"
104+
case "$RAW_LABEL" in
105+
feature) CUSTOM_LABEL="✨ feature" ;;
106+
fix) CUSTOM_LABEL="🐛 fix" ;;
107+
docs) CUSTOM_LABEL="📝 docs" ;;
108+
style) CUSTOM_LABEL="💄 style" ;;
109+
refactor) CUSTOM_LABEL="♻️ refactor" ;;
110+
test) CUSTOM_LABEL="🚨 test" ;;
111+
chore) CUSTOM_LABEL="🔧 chore" ;;
112+
*) CUSTOM_LABEL="$RAW_LABEL" ;;
113+
esac
114+
echo "CUSTOM_LABEL=$CUSTOM_LABEL" >> $GITHUB_ENV
115+
101116
- name: Update issue title
102117
uses: actions-cool/issues-helper@v3
103118
with:
@@ -122,7 +137,7 @@ jobs:
122137
token: ${{ secrets.GITHUB_TOKEN }}
123138
issue-number: ${{ github.event.issue.number }}
124139
labels: |
125-
${{ steps.issue-parser.outputs.issueparser_label-selection }}
140+
${{ env.CUSTOM_LABEL }}
126141
127142
- name: Create branch with Epic number
128143
if: steps.issue-parser.outputs.issueparser_label-selection != 'fix'

0 commit comments

Comments
 (0)