File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ PR_TITLE="$1"
22
22
# Trim WIP and tags from title
23
23
trimmed_title=$( echo " $PR_TITLE " | sed -E " s/$WIP_REGEX //" | sed -E " s/$TAG_REGEX //" | xargs)
24
24
25
+ # Normalize common emojis in text form to actual emojis
26
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:warning:/⚠/g" )
27
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:sparkles:/✨/g" )
28
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:bug:/🐛/g" )
29
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:book:/📖/g" )
30
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:rocket:/🚀/g" )
31
+ trimmed_title=$( echo " $trimmed_title " | sed -E " s/:seedling:/🌱/g" )
32
+
25
33
# Check PR type prefix
26
34
if [[ " $trimmed_title " =~ ^⚠ ]] || [[ " $trimmed_title " =~ ^✨ ]] || [[ " $trimmed_title " =~ ^🐛 ]] || [[ " $trimmed_title " =~ ^📖 ]] || [[ " $trimmed_title " =~ ^🚀 ]] || [[ " $trimmed_title " =~ ^🌱 ]]; then
27
35
echo " PR title is valid: $trimmed_title "
You can’t perform that action at this time.
0 commit comments