Skip to content

Add GitHub Action for JSON translation validation#14

Merged
Sayrix merged 6 commits into
mainfrom
copilot/add-github-action-json-validation
Dec 5, 2025
Merged

Add GitHub Action for JSON translation validation#14
Sayrix merged 6 commits into
mainfrom
copilot/add-github-action-json-validation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

JSON Validation GitHub Action Implementation

  • Convert to use Bun.sh instead of Node.js
  • Use Bun's native Bun.file() API for JSON parsing
  • Use Bun's file system APIs
  • Update GitHub Actions workflow to use oven-sh/setup-bun@v2
  • Revert README.md changes as requested
  • Test validation script with Bun

Changes Made:

  • ✅ Replaced Node.js with Bun in workflow
  • ✅ Updated script to use Bun.file() API for reading JSON files
  • ✅ Using ES modules (import/export) instead of CommonJS
  • ✅ All validation features remain the same (syntax check, missing/extra keys)
  • ✅ README.md reverted to original state

Testing:
Script tested successfully with Bun v1.3.3 and properly detects:

  • Missing keys in zh-TW.json (fails validation)
  • Extra keys in es.json (warnings only)
Original prompt

I want you to add a GitHub Action that on PR opened, will simply validate the JSON against en.json, for example, check for missing or replaced keys, validate the JSON syntax, etc. Please first make a plan and tell me about that plan.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits December 5, 2025 19:48
Co-authored-by: Sayrix <43046854+Sayrix@users.noreply.github.com>
Co-authored-by: Sayrix <43046854+Sayrix@users.noreply.github.com>
Co-authored-by: Sayrix <43046854+Sayrix@users.noreply.github.com>
Co-authored-by: Sayrix <43046854+Sayrix@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Action to validate JSON on PR creation Add GitHub Action for JSON translation validation Dec 5, 2025
Copilot AI requested a review from Sayrix December 5, 2025 19:56
@Sayrix
Copy link
Copy Markdown
Member

Sayrix commented Dec 5, 2025

@copilot Use Bun.sh for the actions and the code. Use Bun's native API. Also revert your changes to the README.md

Co-authored-by: Sayrix <43046854+Sayrix@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 5, 2025

Translation Validation Failed

The JSON validation check has failed. Please review the workflow logs for details on missing or extra keys, or JSON syntax errors.

View workflow run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 5, 2025

Translation Validation Failed

The JSON validation check has failed. Please review the workflow logs for details on missing or extra keys, or JSON syntax errors.

View workflow run

@Sayrix Sayrix marked this pull request as ready for review December 5, 2025 23:11
@Sayrix Sayrix merged commit 76f3192 into main Dec 5, 2025
0 of 2 checks passed
@Sayrix Sayrix deleted the copilot/add-github-action-json-validation branch December 5, 2025 23:11
Copilot AI requested a review from Sayrix December 5, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants