File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,17 @@ jobs:
19
19
run : |
20
20
LANG_CODE=$(sed 's/.*\[\([^]]*\)].*/\1/' <<< "$ISSUE_TITLE")
21
21
FULL_LANG=$(sed 's/.*<\([^>]*\)>.*/\1/' <<< "$ISSUE_TITLE")
22
- if [[ "$LANG_CODE" =~ ^[a-z]{2}(-[A-Z]{2})?$ && "$ISSUE_TITLE" =~ <[^>]+> ]]; then
23
- echo "lang_code=$LANG_CODE" >> $GITHUB_ENV
24
- echo "full_lang=$FULL_LANG" >> $GITHUB_ENV
25
- echo "issue_num=$ISSUE_NUM" >> $GITHUB_ENV
22
+ if [[ "$LANG_CODE" =~ ^[a-z]{2}(-[A-Z]{2})?$ ]]; then
23
+ if echo "$ISSUE_TITLE" | grep -q '<[^>]\+>'; then
24
+ echo "lang_code=$LANG_CODE" >> $GITHUB_ENV
25
+ echo "full_lang=$FULL_LANG" >> $GITHUB_ENV
26
+ echo "issue_num=$ISSUE_NUM" >> $GITHUB_ENV
27
+ else
28
+ echo Error: language name in wrong format.
29
+ exit 1
30
+ fi
26
31
else
27
- echo Error: language name/ code in wrong format.
32
+ echo Error: language code in wrong format.
28
33
exit 1
29
34
fi
30
35
You can’t perform that action at this time.
0 commit comments