refactor(ci): simplify web localization sync to direct hl commands#1352
Conversation
Replace the hyperlocalise-web-sync composite action with workflow steps that run hl extract, hl sync push/pull, and hl pack directly so CLI output appears in the job log without custom bash wrappers or artifacts. Co-authored-by: Minh Cung <cungminh2710@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Greptile SummaryThis PR simplifies the web localization sync workflows. The main changes are:
Confidence Score: 4/5The localization download workflow can open translation PRs without the validation gate it used before.
.github/workflows/hyperlocalise-web-localize.yml
|
| Filename | Overview |
|---|---|
| .github/actions/hyperlocalise-web-sync/action.yml | Deleted the composite action that previously handled extraction, sync, packing, validation, reports, and artifacts. |
| .github/workflows/hyperlocalise-web-localize.yml | Replaced the composite action with direct hl steps, but the download job no longer validates the pulled diff before creating a PR. |
| .github/workflows/ci.yml | Replaced the web sync action self-test with direct dry-run CLI commands and a pack step. |
| tools/github-action/hyperlocalise-ci/scripts/install-hyperlocalise.sh | Adds an hl symlink next to the installed hyperlocalise binary. |
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
.github/workflows/hyperlocalise-web-localize.yml:118
**Pulled Catalogs Skip Validation**
When `hl sync pull` downloads translations with bad ICU placeholders, missing target text, or HTML tag mismatches, this workflow now runs `hl pack` and opens the translation PR without the old `hl check --diff-stdin` gate. Invalid runtime catalogs can reach review with no workflow failure.
### Issue 2 of 2
.github/workflows/ci.yml:81-82
**Smoke Test Skips Extraction**
The smoke test now plans the dry-run push from the committed `lang/en-US.json` instead of first running extraction. If source messages change but the catalog is stale, this job still passes even though the real upload flow depends on extracting those source messages before pushing.
Reviews (1): Last reviewed commit: "refactor(ci): simplify web localization ..." | Re-trigger Greptile
| --ignore '**/__tests__/**' | ||
|
|
||
| - name: Pull translations | ||
| run: hl sync pull |
There was a problem hiding this comment.
Pulled Catalogs Skip Validation
When hl sync pull downloads translations with bad ICU placeholders, missing target text, or HTML tag mismatches, this workflow now runs hl pack and opens the translation PR without the old hl check --diff-stdin gate. Invalid runtime catalogs can reach review with no workflow failure.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/hyperlocalise-web-localize.yml
Line: 118
Comment:
**Pulled Catalogs Skip Validation**
When `hl sync pull` downloads translations with bad ICU placeholders, missing target text, or HTML tag mismatches, this workflow now runs `hl pack` and opens the translation PR without the old `hl check --diff-stdin` gate. Invalid runtime catalogs can reach review with no workflow failure.
How can I resolve this? If you propose a fix, please make it concise.| - name: Dry-run sync push | ||
| run: hl sync push --dry-run |
There was a problem hiding this comment.
The smoke test now plans the dry-run push from the committed lang/en-US.json instead of first running extraction. If source messages change but the catalog is stale, this job still passes even though the real upload flow depends on extracting those source messages before pushing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 81-82
Comment:
**Smoke Test Skips Extraction**
The smoke test now plans the dry-run push from the committed `lang/en-US.json` instead of first running extraction. If source messages change but the catalog is stale, this job still passes even though the real upload flow depends on extracting those source messages before pushing.
How can I resolve this? If you propose a fix, please make it concise.
Summary
The web localization workflow no longer uses the
hyperlocalise-web-synccomposite action or custom bash wrappers. Each step now runs a singlehlCLI command so output appears directly in the GitHub Actions log.Upload job
hl extract— refreshlang/en-US.jsonhl sync push— upload sourcesDownload job
hl extract— refresh source catalog before pullhl sync pull— download translationshl pack— strip FormatJS metadata for runtimeRemoved
.github/actions/hyperlocalise-web-synccomposite action (~300 lines of bash)write-action-summary.mjsvalidation plumbing from the sync pathweb-sync-action-self-testjob (replaced with a simpler CLI smoke test)Other changes
hlsymlink alongsidehyperlocalisehl sync push --dry-run,hl sync pull --dry-run, andhl packdirectlyTest plan
web-sync-cli-smoke-testjob passes on this PRworkflow_dispatchupload/download jobs run successfully with real secrets