@@ -11,49 +11,47 @@ jobs:
1111 - name : Determine Issue Type
1212 id : type
1313 run : |
14- # 디버그: 라벨 JSON 전체 출력
15- LABELS_JSON='${{ toJson(github.event.issue.labels) }}'
14+ read -r -d '' LABELS_JSON <<'JSON'
15+ ${{ toJson(github.event.issue.labels) }}
16+ JSON
17+
1618 label_names=$(echo "$LABELS_JSON" | jq -r '.[].name')
1719
18- # Debug
19- if echo "$label_names" | grep -Fxq '🐞 fix'; then
20- echo "type=fix" >> $GITHUB_OUTPUT
21- echo "template=fix-task.yml" >> $GITHUB_OUTPUT
22- fi
20+ # 디버그: 라벨 JSON 전체 출력
2321 echo "=== 라벨 목록 확인 ==="
2422 echo "$label_names" | cat -vet
2523
26- if echo "$LABELS_JSON" | grep -q '✨ feat'; then
27- echo "type=feature" >> $GITHUB_OUTPUT
28- echo "template=feature-task.yml" >> $GITHUB_OUTPUT
29-
30- elif echo "$LABELS_JSON" | grep -q '🐞 fix'; then
31- echo "type=fix" >> $GITHUB_OUTPUT
32- echo "template=fix-task.yml" >> $GITHUB_OUTPUT
24+ if echo "$label_names" | grep -Fxq '✨ feat'; then
25+ echo "type=feature" >>"$GITHUB_OUTPUT"
26+ echo "template=feature-task.yml" >>"$GITHUB_OUTPUT"
27+
28+ elif echo "$label_names" | grep -Fxq '🐞 fix'; then
29+ echo "type=fix" >>"$GITHUB_OUTPUT"
30+ echo "template=fix-task.yml" >>"$GITHUB_OUTPUT"
31+
32+ elif echo "$label_names" | grep -Fxq '🔨 refactor'; then
33+ echo "type=refactor" >>"$GITHUB_OUTPUT"
34+ echo "template=refactor-task.yml" >>"$GITHUB_OUTPUT"
35+
36+ elif echo "$label_names" | grep -Fxq '📃 docs'; then
37+ echo "type=docs" >>"$GITHUB_OUTPUT"
38+ echo "template=docs-task.yml" >>"$GITHUB_OUTPUT"
39+
40+ elif echo "$label_names" | grep -Fxq '⚙️ chore'; then
41+ echo "type=chore" >>"$GITHUB_OUTPUT"
42+ echo "template=setting-task.yml" >>"$GITHUB_OUTPUT"
43+
44+ elif echo "$label_names" | grep -Fxq '✅ test'; then
45+ echo "type=test" >>"$GITHUB_OUTPUT"
46+ echo "template=test-task.yml" >>"$GITHUB_OUTPUT"
47+
48+ elif echo "$label_names" | grep -Fxq '🎨 style'; then
49+ echo "type=style" >>"$GITHUB_OUTPUT"
50+ echo "template=style-task.yml" >>"$GITHUB_OUTPUT"
3351
34- elif echo "$LABELS_JSON" | grep -q '🔨 refactor'; then
35- echo "type=refactor" >> $GITHUB_OUTPUT
36- echo "template=refactor-task.yml" >> $GITHUB_OUTPUT
37-
38- elif echo "$LABELS_JSON" | grep -q '📃 docs'; then
39- echo "type=docs" >> $GITHUB_OUTPUT
40- echo "template=docs-task.yml" >> $GITHUB_OUTPUT
41-
42- elif echo "$LABELS_JSON" | grep -q '⚙️ chore'; then
43- echo "type=chore" >> $GITHUB_OUTPUT
44- echo "template=setting-task.yml" >> $GITHUB_OUTPUT
45-
46- elif echo "$LABELS_JSON" | grep -q '✅ test'; then
47- echo "type=test" >> $GITHUB_OUTPUT
48- echo "template=test-task.yml" >> $GITHUB_OUTPUT
49-
50- elif echo "$LABELS_JSON" | grep -q '🎨 style'; then
51- echo "type=style" >> $GITHUB_OUTPUT
52- echo "template=style-task.yml" >> $GITHUB_OUTPUT
53-
5452 else
55- echo "type=other" >> $GITHUB_OUTPUT
56- echo "template=default.yml" >> $GITHUB_OUTPUT
53+ echo "type=other" >>" $GITHUB_OUTPUT"
54+ echo "template=default.yml" >>" $GITHUB_OUTPUT"
5755 fi
5856
5957 - name : Jira Login
0 commit comments