mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-30 03:24:34 +00:00
* ci: add translation-sync guardrails for READMEs and docs Add a check-translation-sync script + tests wired into CI: a blocking check that all five README.<locale>.md files share an identical level-2 heading structure (compared by structure not translated text, and code-fence-aware), and a non-blocking warning when a docs/en page changes without its zh/ja counterparts. Addresses #419. * ci: address review feedback on translation-sync guardrails - Move the translation-sync job out of ci.yml into its own .github/workflows/translation-sync.yml, scoped with paths: filters (README*.md, pages/src/content/docs/**, the checker scripts) so it only runs on translation changes and never blocks the core pipeline. - runReadmeCheck: short-circuit with exit 1 when any expected README*.md is missing, before the structure comparison, so a missing file can no longer mask a real divergence. - extractHeadings: add a TODO(commonmark) note that closing fences are matched by fence char only, not by length. - test: drop the dead en/zh fixtures and the void statements in testReorderedHeadingFails; keep the en2/zh2 pair that actually drives the assertion. * ci: fix length-unaware code-fence parsing and pin node image Address the automated review comments beyond the maintainer's minor note: - extractHeadings: track the opening fence length and only close on a same-char run that is at least as long (per CommonMark). Previously a block opened with ```` and containing an inner ``` closed early, so lines inside the block could be misread as headings (or real headings dropped), producing false-positive structure-divergence errors. Adds a regression test covering the inner-shorter-fence case. - translation-sync.yml: pin node:24.18.0 instead of the mutable node:24 major tag, matching the golang:1.26.5 pin used by the other jobs. |
||
|---|---|---|
| .. | ||
| github-actions | ||
| publish | ||
| install.js | ||
| platform.js | ||
| update.js | ||