Compare commits

..

2 Commits

Author SHA1 Message Date
GitHub Action
75097c3b8f chore: crowdin locale sync 2026-02-01 03:38:08 +00:00
Michael Genson
2987cf8ba6 dev: Allow locale sync path in auto merge (#6974) 2026-01-31 21:37:31 -06:00

View File

@@ -61,11 +61,20 @@ jobs:
FILES=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json files --jq '.files[].path')
for file in $FILES; do
if [[ ! "$file" =~ ^frontend/lang/ ]] && [[ ! "$file" =~ ^mealie/repos/seed/resources/[^/]+/locales/ ]]; then
echo "::error::Invalid file path: $file"
echo "Only files in frontend/lang/ or mealie/repos/seed/resources/*/locales/ are allowed"
exit 1
# Check if file matches any allowed path
if [[ "$file" == "frontend/composables/use-locales/available-locales.ts" ]] || \
[[ "$file" =~ ^frontend/lang/ ]] || \
[[ "$file" =~ ^mealie/repos/seed/resources/[^/]+/locales/ ]]; then
continue
fi
# File doesn't match allowed paths
echo "::error::Invalid file path: $file"
echo "Only the following paths are allowed:"
echo " - frontend/composables/use-locales/available-locales.ts"
echo " - frontend/lang/"
echo " - mealie/repos/seed/resources/*/locales/"
exit 1
done
echo "All files are in allowed paths"