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.
42 lines
1.3 KiB
JSON
42 lines
1.3 KiB
JSON
{
|
|
"name": "@alibaba-group/open-code-review",
|
|
"version": "0.0.0",
|
|
"description": "OpenCodeReview CLI — AI-powered code review tool",
|
|
"bin": {
|
|
"ocr": "bin/ocr.js"
|
|
},
|
|
"files": [
|
|
"bin/ocr.js",
|
|
"scripts/install.js",
|
|
"scripts/update.js",
|
|
"scripts/platform.js",
|
|
"imgs/"
|
|
],
|
|
"scripts": {
|
|
"postinstall": "node scripts/install.js",
|
|
"test:github-actions": "node scripts/github-actions/post-review-comments.test.js && node scripts/github-actions/check-translation-sync.test.js"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/alibaba/open-code-review.git"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"ocrConfig": {
|
|
"urlPattern": "https://github.com/alibaba/open-code-review/releases/download/v{version}/opencodereview-{os}-{arch}",
|
|
"checksumPattern": "https://github.com/alibaba/open-code-review/releases/download/v{version}/sha256sum.txt"
|
|
},
|
|
"optionalDependencies": {
|
|
"@alibaba-group/ocr-darwin-arm64": "0.0.0",
|
|
"@alibaba-group/ocr-darwin-x64": "0.0.0",
|
|
"@alibaba-group/ocr-linux-arm64": "0.0.0",
|
|
"@alibaba-group/ocr-linux-x64": "0.0.0",
|
|
"@alibaba-group/ocr-win32-arm64": "0.0.0",
|
|
"@alibaba-group/ocr-win32-x64": "0.0.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=14"
|
|
},
|
|
"license": "Apache-2.0"
|
|
}
|