Skip to content

Pass ownerLogin as param to isViolationDismissed #3 #72145

Pass ownerLogin as param to isViolationDismissed #3

Pass ownerLogin as param to isViolationDismissed #3 #72145

name: Translation Dry Run
on:
pull_request:
types: [opened, synchronize]
paths-ignore: ['docs', 'help']
jobs:
# We always run generateTranslations --dry-run in CI to verify the script still works end-to-end.
# It imports from @src and @libs; Bun runs it with stubReactNative preload for modules that expect RN.
dryRun:
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
- name: Setup Node
uses: ./.github/actions/composite/setupNode
- name: Capture pre-run checksum
id: before
run: echo "sha=$(sha256sum src/languages/it.ts | cut -d ' ' -f1)" >> "$GITHUB_OUTPUT"
- name: Run generateTranslations dry run
run: npx bun ./scripts/generateTranslations.ts --dry-run --locales it
- name: Verify translation output
run: |
# The [it] prefix only ever comes from the dry-run's dummy translator, so a checksum
# change plus this marker proves the script actually re-ran and wrote fresh output,
# not that it silently no-op'd and left the already-committed file untouched.
test "$(sha256sum src/languages/it.ts | cut -d ' ' -f1)" != "${{ steps.before.outputs.sha }}"
grep -q 'This file was automatically generated' src/languages/it.ts
grep -q '\[it\]' src/languages/it.ts
- name: Explain failure
if: failure()
run: |
echo '::error:: generateTranslations --dry-run failed or did not produce expected output in src/languages/it.ts. Check script imports and recent changes to @src/@libs code the script depends on.'
exit 1