Skip to content

Commit

Permalink
[meta] Update check_pr_translations.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
MelanX committed Aug 24, 2024
1 parent 2adbc6b commit 1dc7448
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/check_pr_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

name: Check Localization Files
on:
pull_request:
pull_request_target:
paths:
- 'src/main/resources/assets/**/lang/*.json'

Expand All @@ -20,13 +20,15 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Check localization files
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
# Get the list of added or modified localization files
FILES=$(gh pr diff $PR_NUMBER --name-only)
FILES=$(gh pr diff $PR_NUMBER --name-only | grep -E 'src/main/resources/assets/.*/lang/.*\.json')
# Initialize an array to store the missing keys
MISSING_KEYS=()
# Iterate over each file
Expand Down

0 comments on commit 1dc7448

Please sign in to comment.