mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-02-26 01:33:12 -05:00
Compare commits
1 Commits
auto-local
...
auto-local
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26cdcbd9ba |
27
.github/workflows/auto-merge-l10n.yml
vendored
27
.github/workflows/auto-merge-l10n.yml
vendored
@@ -25,12 +25,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
AUTHOR: ${{ github.event.pull_request.user.login }}
|
AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||||
run: |
|
run: |
|
||||||
if [[
|
if [[ "$AUTHOR" != "hay-kot" && "$AUTHOR" != "github-actions[bot]" ]]; then
|
||||||
"$AUTHOR" != "hay-kot" &&
|
echo "::error::PR author must be hay-kot or github-actions[bot] for auto-merge (got: $AUTHOR)"
|
||||||
"$AUTHOR" != "github-actions[bot]" &&
|
|
||||||
"$AUTHOR" != "mealie-actions[bot]"
|
|
||||||
]]; then
|
|
||||||
echo "::error::PR author must be hay-kot, github-actions[bot], or mealie-actions[bot] for auto-merge (got: $AUTHOR)"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Author validated: $AUTHOR"
|
echo "Author validated: $AUTHOR"
|
||||||
@@ -47,8 +43,8 @@ jobs:
|
|||||||
|
|
||||||
echo "PR changes: +$ADDITIONS -$DELETIONS (total: $TOTAL lines)"
|
echo "PR changes: +$ADDITIONS -$DELETIONS (total: $TOTAL lines)"
|
||||||
|
|
||||||
if [ "$TOTAL" -gt 400 ]; then
|
if [ "$TOTAL" -gt 200 ]; then
|
||||||
echo "::error::PR exceeds 400 line change limit ($TOTAL lines)"
|
echo "::error::PR exceeds 200 line change limit ($TOTAL lines)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -61,20 +57,11 @@ jobs:
|
|||||||
FILES=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json files --jq '.files[].path')
|
FILES=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json files --jq '.files[].path')
|
||||||
|
|
||||||
for file in $FILES; do
|
for file in $FILES; do
|
||||||
# Check if file matches any allowed path
|
if [[ ! "$file" =~ ^frontend/lang/ ]] && [[ ! "$file" =~ ^mealie/repos/seed/resources/[^/]+/locales/ ]]; then
|
||||||
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 "::error::Invalid file path: $file"
|
||||||
echo "Only the following paths are allowed:"
|
echo "Only files in frontend/lang/ or mealie/repos/seed/resources/*/locales/ are allowed"
|
||||||
echo " - frontend/composables/use-locales/available-locales.ts"
|
|
||||||
echo " - frontend/lang/"
|
|
||||||
echo " - mealie/repos/seed/resources/*/locales/"
|
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "All files are in allowed paths"
|
echo "All files are in allowed paths"
|
||||||
|
|||||||
Reference in New Issue
Block a user