Skip to content

Commit

Permalink
[meta] Update check_pr_translations.yml.
Browse files Browse the repository at this point in the history
MelanX committed Aug 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent aa3ed58 commit d5c915a
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
@@ -5,7 +5,7 @@

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

@@ -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

0 comments on commit d5c915a

Please sign in to comment.