Skip to content

Commit

Permalink
Hopefully fix pr translation check workflow this time
Browse files Browse the repository at this point in the history
  • Loading branch information
MelanX committed Aug 24, 2024
1 parent 7909264 commit e47a494
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mod_workflows/check_pr_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

Expand All @@ -17,13 +17,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 e47a494

Please sign in to comment.