From 79744099f63cfa3498362b15f9d2d30024602d0c Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Mon, 27 Apr 2026 13:07:39 +0300 Subject: [PATCH] chore(ci): warn on unmapped type or scope in pr-labeler Address review feedback from myasnikovdaniil on .github/workflows/pr-labeler.yaml:160,173: emit core.warning when a Conventional Commits type has no kind/* mapping or a scope has no area/* mapping. Without the warning, typos (e.g., "hotfix" instead of "fix") and recurring new scopes silently fall through to area/uncategorized, masking that the mapping has drifted. Assisted-By: Claude Signed-off-by: Aleksei Sviridkin --- .github/workflows/pr-labeler.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-labeler.yaml b/.github/workflows/pr-labeler.yaml index 5a6564a9..6e6f3017 100644 --- a/.github/workflows/pr-labeler.yaml +++ b/.github/workflows/pr-labeler.yaml @@ -158,8 +158,12 @@ jobs: } // 5. Apply kind/* from type. - if (type && typeToKind[type]) { - toAdd.add(typeToKind[type]); + if (type) { + if (typeToKind[type]) { + toAdd.add(typeToKind[type]); + } else { + core.warning(`type "${type}" has no kind/* mapping — typo or new type? See .github/workflows/pr-labeler.yaml typeToKind`); + } } // 6. Apply area/* from scope. Composite scopes split on comma. @@ -170,6 +174,8 @@ jobs: for (const s of scopes) { if (scopeToArea[s]) { toAdd.add(scopeToArea[s]); + } else { + core.warning(`scope "${s}" has no area/* mapping — consider extending scopeToArea in .github/workflows/pr-labeler.yaml if it recurs`); } }