Fix Russian 404 pages #4620
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Translation Guard | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- labeled | |
- unlabeled | |
- reopened | |
jobs: | |
check-labels: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Labels | |
run: | | |
labels='${{ toJSON(github.event.pull_request.labels.*.name) }}' | |
language_labels=(":es: ES" ":indonesia: ID" ":cn: ZH" ":ukraine: UK" ":ru: RU") | |
has_label() { | |
[ `echo $labels | jq -rcM ". | index(\"$1\")"` != "null" ] | |
} | |
if ! has_label "time-sensitive" && has_label "ready for translation"; then | |
for language_label in "${language_labels[@]}"; do | |
if ! has_label "$language_label"; then | |
echo "Missing language label: $language_label" | |
exit 1 | |
fi | |
done | |
elif ! has_label "not translatable"; then | |
echo "The pull request must at least have one of the following labels: ready for translation, time-sensitive, not translatable" | |
exit 1 | |
fi |