File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,12 +19,17 @@ jobs:
1919 run : |
2020 LANG_CODE=$(sed 's/.*\[\([^]]*\)].*/\1/' <<< "$ISSUE_TITLE")
2121 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
2631 else
27- echo Error: language name/ code in wrong format.
32+ echo Error: language code in wrong format.
2833 exit 1
2934 fi
3035
You can’t perform that action at this time.
0 commit comments