Skip to content

refactor(ci): simplify web localization sync to direct hl commands#1352

Merged
cungminh2710 merged 1 commit into
mainfrom
cursor/simplify-localize-sync-fcb7
Jul 10, 2026
Merged

refactor(ci): simplify web localization sync to direct hl commands#1352
cungminh2710 merged 1 commit into
mainfrom
cursor/simplify-localize-sync-fcb7

Conversation

@cungminh2710

Copy link
Copy Markdown
Contributor

Summary

The web localization workflow no longer uses the hyperlocalise-web-sync composite action or custom bash wrappers. Each step now runs a single hl CLI command so output appears directly in the GitHub Actions log.

Upload job

  • hl extract — refresh lang/en-US.json
  • hl sync push — upload sources

Download job

  • hl extract — refresh source catalog before pull
  • hl sync pull — download translations
  • hl pack — strip FormatJS metadata for runtime

Removed

  • .github/actions/hyperlocalise-web-sync composite action (~300 lines of bash)
  • Artifact uploads, JSON report teeing, and write-action-summary.mjs validation plumbing from the sync path
  • CI web-sync-action-self-test job (replaced with a simpler CLI smoke test)

Other changes

  • Install script now creates an hl symlink alongside hyperlocalise
  • CI smoke test runs hl sync push --dry-run, hl sync pull --dry-run, and hl pack directly

Test plan

  • CI web-sync-cli-smoke-test job passes on this PR
  • Manual workflow_dispatch upload/download jobs run successfully with real secrets
Open in Web Open in Cursor 

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>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hyperlocalise Ignored Ignored Jul 10, 2026 12:07am

Request Review

@cungminh2710
cungminh2710 marked this pull request as ready for review July 10, 2026 00:10
@cungminh2710
cungminh2710 requested a review from MuenYu as a code owner July 10, 2026 00:10
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR simplifies the web localization sync workflows. The main changes are:

  • Removed the reusable web sync composite action.
  • Replaced upload and download jobs with direct hl commands.
  • Added an hl symlink during CLI installation.
  • Replaced the action self-test with a CLI smoke test.

Confidence Score: 4/5

The localization download workflow can open translation PRs without the validation gate it used before.

  • Direct hl commands should find i18n.yml from the web app working directory.
  • The new hl symlink should resolve correctly in the install directory.
  • The pulled translation diff can skip ICU, placeholder, and tag validation before PR creation.

.github/workflows/hyperlocalise-web-localize.yml

Important Files Changed

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.

Fix All in Codex

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Codex

Comment thread .github/workflows/ci.yml
Comment on lines +81 to +82
- name: Dry-run sync push
run: hl sync push --dry-run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Fix in Codex

@cungminh2710
cungminh2710 merged commit 64d0a20 into main Jul 10, 2026
12 checks passed
@cungminh2710
cungminh2710 deleted the cursor/simplify-localize-sync-fcb7 branch July 10, 2026 00:19
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