fix(labels): address taxonomy review findings
This commit is contained in:
2
.github/issue-management/policy.mjs
vendored
2
.github/issue-management/policy.mjs
vendored
@@ -20,9 +20,11 @@ const PR_KINDS = new Set([
|
||||
'kind/cleanup',
|
||||
'kind/dependency',
|
||||
])
|
||||
// Aliases removed by the unified taxonomy migration remain reserved so they cannot be recreated.
|
||||
const LEGACY_LABELS = new Set([
|
||||
'kind/bug',
|
||||
'kind/documentation',
|
||||
'feature',
|
||||
'bug-fix',
|
||||
'doc',
|
||||
'cleanup',
|
||||
|
||||
42
.github/issue-management/policy.test.mjs
vendored
42
.github/issue-management/policy.test.mjs
vendored
@@ -36,6 +36,22 @@ const canonicalKinds = [
|
||||
'kind/dependency',
|
||||
]
|
||||
|
||||
// Keep an independent oracle rather than importing the implementation's reserved set.
|
||||
const legacyLabels = [
|
||||
'kind/bug',
|
||||
'kind/documentation',
|
||||
'feature',
|
||||
'bug-fix',
|
||||
'doc',
|
||||
'cleanup',
|
||||
'testing',
|
||||
'dependencies',
|
||||
'ci',
|
||||
'cli',
|
||||
'llm',
|
||||
'web-search',
|
||||
]
|
||||
|
||||
const reviewedPull = (labels) => ({
|
||||
isDraft: false,
|
||||
authorType: 'User',
|
||||
@@ -115,17 +131,7 @@ test('reserves PR kind and legacy labels for pull requests', () => {
|
||||
for (const label of [
|
||||
...canonicalKinds,
|
||||
'kind/experimental',
|
||||
'kind/bug',
|
||||
'kind/documentation',
|
||||
'bug-fix',
|
||||
'doc',
|
||||
'cleanup',
|
||||
'testing',
|
||||
'dependencies',
|
||||
'ci',
|
||||
'cli',
|
||||
'llm',
|
||||
'web-search',
|
||||
...legacyLabels,
|
||||
]) {
|
||||
assert.ok(
|
||||
validateIssue({ ...legalIssue, labels: [label] }).some((error) =>
|
||||
@@ -326,19 +332,7 @@ test('rejects multiple, unknown, legacy, and Issue-source PR labels', () => {
|
||||
'PR 含不支持的 kind/*:kind/experimental',
|
||||
),
|
||||
)
|
||||
for (const label of [
|
||||
'kind/bug',
|
||||
'kind/documentation',
|
||||
'bug-fix',
|
||||
'doc',
|
||||
'cleanup',
|
||||
'testing',
|
||||
'dependencies',
|
||||
'ci',
|
||||
'cli',
|
||||
'llm',
|
||||
'web-search',
|
||||
]) {
|
||||
for (const label of legacyLabels) {
|
||||
assert.ok(
|
||||
validatePullRequest(reviewedPull(['kind/feature', 'area/web', label])).some((error) =>
|
||||
error.startsWith('PR 含旧版标签:'),
|
||||
|
||||
Reference in New Issue
Block a user