From f16853b6d618b3d7b6bda08b40e0ada8b714d450 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Sat, 22 Nov 2025 15:14:22 +0900 Subject: [PATCH 1/2] fix(ci): handle additional reference section URL patterns in sync-untranslated-issue --- .github/scripts/sync-untranslated-issue.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/scripts/sync-untranslated-issue.mjs b/.github/scripts/sync-untranslated-issue.mjs index f3f25cfc0..53587aecc 100644 --- a/.github/scripts/sync-untranslated-issue.mjs +++ b/.github/scripts/sync-untranslated-issue.mjs @@ -80,6 +80,13 @@ function generatePreviewPath(filepath) { if (basePath === 'reference/roadmap') { return 'roadmap'; } + if (basePath === 'reference/cli') { + return 'cli'; + } + // reference/errors, reference/extended-diagnostics は reference/ を削除 + if (basePath.startsWith('reference/errors/') || basePath.startsWith('reference/extended-diagnostics/')) { + return basePath.replace('reference/', ''); + } // チュートリアルの特殊なパス変換 if (basePath.startsWith('tutorials/')) { From 3b170e3fafdaedca0e7137a35b9895bbd0ce6023 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Sat, 22 Nov 2025 15:15:18 +0900 Subject: [PATCH 2/2] refactor(ci): consolidate reference section URL pattern handling --- .github/scripts/sync-untranslated-issue.mjs | 25 ++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/scripts/sync-untranslated-issue.mjs b/.github/scripts/sync-untranslated-issue.mjs index 53587aecc..0a63200d1 100644 --- a/.github/scripts/sync-untranslated-issue.mjs +++ b/.github/scripts/sync-untranslated-issue.mjs @@ -73,19 +73,18 @@ function generatePreviewPath(filepath) { .replace(/\/README\.md$/, '') // READMEの場合はディレクトリのみ .replace(/\.md$/, ''); - // reference 配下の特殊なパス変換 - if (basePath === 'reference/press-kit') { - return 'press-kit'; - } - if (basePath === 'reference/roadmap') { - return 'roadmap'; - } - if (basePath === 'reference/cli') { - return 'cli'; - } - // reference/errors, reference/extended-diagnostics は reference/ を削除 - if (basePath.startsWith('reference/errors/') || basePath.startsWith('reference/extended-diagnostics/')) { - return basePath.replace('reference/', ''); + // reference 配下の特殊なパス変換: reference/ プレフィックスを削除 + const referenceTopLevelPaths = ['press-kit', 'roadmap', 'cli']; + if (basePath.startsWith('reference/')) { + const subPath = basePath.replace('reference/', ''); + // トップレベルパス(press-kit, roadmap, cli) + if (referenceTopLevelPaths.includes(subPath)) { + return subPath; + } + // サブディレクトリパス(errors/*, extended-diagnostics/*) + if (subPath.startsWith('errors/') || subPath.startsWith('extended-diagnostics/')) { + return subPath; + } } // チュートリアルの特殊なパス変換