From 6dc098466bf6ac5d6eca61e5b2bf207a56c7fa48 Mon Sep 17 00:00:00 2001 From: yanas Date: Wed, 11 Mar 2026 21:39:50 -0500 Subject: [PATCH] fix: remove type:/platform: prefixes from PR classification labels Labels are now applied as plain names (e.g. "documentation", "web") to match the repo's label definitions. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/pr-classify.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-classify.yml b/.github/workflows/pr-classify.yml index 2b280ea..71ba111 100644 --- a/.github/workflows/pr-classify.yml +++ b/.github/workflows/pr-classify.yml @@ -93,12 +93,11 @@ jobs: const validPlatforms = ['web', 'android', 'ios', 'native']; if (validTypes.includes(parsed.type)) { - typeLabel = `type: ${parsed.type}`; + typeLabel = parsed.type; } if (Array.isArray(parsed.platforms)) { platformLabels = parsed.platforms - .filter(p => validPlatforms.includes(p)) - .map(p => `platform: ${p}`); + .filter(p => validPlatforms.includes(p)); } summary = parsed.summary || null; } @@ -108,10 +107,12 @@ jobs: } } - // --- Remove old type:/platform: labels --- + // --- Remove old type/platform labels --- + const validTypes = ['feature', 'fix', 'chore', 'refactor', 'language', 'documentation', 'test', 'security']; + const validPlatforms = ['web', 'android', 'ios', 'native']; const existingLabels = await github.rest.issues.listLabelsOnIssue({ owner, repo, issue_number }); const toRemove = existingLabels.data - .filter(l => l.name.startsWith('type: ') || l.name.startsWith('platform: ')) + .filter(l => validTypes.includes(l.name) || validPlatforms.includes(l.name)) .map(l => l.name); for (const label of toRemove) { @@ -132,7 +133,7 @@ jobs: if (parseError || !typeLabel) { await github.rest.issues.createComment({ owner, repo, issue_number, - body: `> [!WARNING]\n> **PR classification** could not determine the PR type. Please apply a \`type:\` label manually.` + body: `> [!WARNING]\n> **PR classification** could not determine the PR type. Please apply a type label manually.` }); } else if (summary) { const platformStr = platformLabels.length > 0