fix: add the account name to prompt #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check i18n Changes | |
on: | |
pull_request: | |
paths: | |
- "src/i18n/locales/en/translation.json" | |
types: | |
- opened | |
- synchronize | |
jobs: | |
check-i18n-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for i18n changes | |
run: | | |
CHANGED_FILES=$(git diff --name-only origin/master ${{ github.event.pull_request.base.sha }}) | |
if echo "$CHANGED_FILES" | grep -q 'src/i18n/locales/en/translation.json'; then | |
CHANGES=$(git diff --unified=0 ${{ github.event.before }} ${{ github.sha }} -- src/i18n/locales/en/translation.json | grep '^\+' | grep -v '+++' | grep -v '^{+"translation": {+$' | jq -r '. | select(. != null)' || true) | |
if [ -n "$CHANGES" ]; then | |
echo "Changes detected in translation file." | |
echo "$CHANGES" | jq -r 'gsub("^[+]"; "") | gsub("\""; "\\\"") | "Key \(.[:100]) has changed"' | |
exit 1 | |
fi | |
else | |
echo "Translation file has not been modified." | |
fi |