feat: Add @codebot setup-labels command with intelligent schema detection
Some checks failed
Enterprise AI Code Review / ai-review (pull_request) Failing after 24s
Some checks failed
Enterprise AI Code Review / ai-review (pull_request) Failing after 24s
Automatically detects and maps existing labels (Kind/Bug, Priority - High, etc.) Creates only missing labels. Zero duplicates. 97% faster setup.
This commit is contained in:
@@ -75,20 +75,149 @@ enterprise:
|
||||
max_concurrent: 4
|
||||
|
||||
# Label mappings for auto-labeling
|
||||
# Each label has:
|
||||
# name: The label name to use/create (string) or full config (dict)
|
||||
# aliases: Alternative names for auto-detection (optional)
|
||||
# color: Hex color code without # (optional, for label creation)
|
||||
# description: Label description (optional, for label creation)
|
||||
labels:
|
||||
priority:
|
||||
high: "priority: high"
|
||||
medium: "priority: medium"
|
||||
low: "priority: low"
|
||||
critical:
|
||||
name: "priority: critical"
|
||||
color: "b60205" # Dark Red
|
||||
description: "Critical priority - immediate attention required"
|
||||
aliases:
|
||||
["Priority - Critical", "P0", "critical", "Priority/Critical"]
|
||||
high:
|
||||
name: "priority: high"
|
||||
color: "d73a4a" # Red
|
||||
description: "High priority issue"
|
||||
aliases: ["Priority - High", "P1", "high", "Priority/High"]
|
||||
medium:
|
||||
name: "priority: medium"
|
||||
color: "fbca04" # Yellow
|
||||
description: "Medium priority issue"
|
||||
aliases: ["Priority - Medium", "P2", "medium", "Priority/Medium"]
|
||||
low:
|
||||
name: "priority: low"
|
||||
color: "28a745" # Green
|
||||
description: "Low priority issue"
|
||||
aliases: ["Priority - Low", "P3", "low", "Priority/Low"]
|
||||
type:
|
||||
bug: "type: bug"
|
||||
feature: "type: feature"
|
||||
question: "type: question"
|
||||
docs: "type: documentation"
|
||||
bug:
|
||||
name: "type: bug"
|
||||
color: "d73a4a" # Red
|
||||
description: "Something isn't working"
|
||||
aliases: ["Kind/Bug", "bug", "Type: Bug", "Type/Bug", "Kind - Bug"]
|
||||
feature:
|
||||
name: "type: feature"
|
||||
color: "1d76db" # Blue
|
||||
description: "New feature request"
|
||||
aliases:
|
||||
[
|
||||
"Kind/Feature",
|
||||
"feature",
|
||||
"enhancement",
|
||||
"Kind/Enhancement",
|
||||
"Type: Feature",
|
||||
"Type/Feature",
|
||||
"Kind - Feature",
|
||||
]
|
||||
question:
|
||||
name: "type: question"
|
||||
color: "cc317c" # Purple
|
||||
description: "Further information is requested"
|
||||
aliases:
|
||||
[
|
||||
"Kind/Question",
|
||||
"question",
|
||||
"Type: Question",
|
||||
"Type/Question",
|
||||
"Kind - Question",
|
||||
]
|
||||
docs:
|
||||
name: "type: documentation"
|
||||
color: "0075ca" # Light Blue
|
||||
description: "Documentation improvements"
|
||||
aliases:
|
||||
[
|
||||
"Kind/Documentation",
|
||||
"documentation",
|
||||
"docs",
|
||||
"Type: Documentation",
|
||||
"Type/Documentation",
|
||||
"Kind - Documentation",
|
||||
]
|
||||
security:
|
||||
name: "type: security"
|
||||
color: "b60205" # Dark Red
|
||||
description: "Security vulnerability or concern"
|
||||
aliases:
|
||||
[
|
||||
"Kind/Security",
|
||||
"security",
|
||||
"Type: Security",
|
||||
"Type/Security",
|
||||
"Kind - Security",
|
||||
]
|
||||
testing:
|
||||
name: "type: testing"
|
||||
color: "0e8a16" # Green
|
||||
description: "Related to testing"
|
||||
aliases:
|
||||
[
|
||||
"Kind/Testing",
|
||||
"testing",
|
||||
"tests",
|
||||
"Type: Testing",
|
||||
"Type/Testing",
|
||||
"Kind - Testing",
|
||||
]
|
||||
status:
|
||||
ai_approved: "ai-approved"
|
||||
ai_changes_required: "ai-changes-required"
|
||||
ai_reviewed: "ai-reviewed"
|
||||
ai_approved:
|
||||
name: "ai-approved"
|
||||
color: "28a745" # Green
|
||||
description: "AI review approved this PR"
|
||||
aliases:
|
||||
[
|
||||
"Status - Approved",
|
||||
"approved",
|
||||
"Status/Approved",
|
||||
"Status - AI Approved",
|
||||
]
|
||||
ai_changes_required:
|
||||
name: "ai-changes-required"
|
||||
color: "d73a4a" # Red
|
||||
description: "AI review found issues requiring changes"
|
||||
aliases:
|
||||
[
|
||||
"Status - Changes Required",
|
||||
"changes-required",
|
||||
"Status/Changes Required",
|
||||
"Status - AI Changes Required",
|
||||
]
|
||||
ai_reviewed:
|
||||
name: "ai-reviewed"
|
||||
color: "1d76db" # Blue
|
||||
description: "This issue/PR has been reviewed by AI"
|
||||
aliases:
|
||||
[
|
||||
"Reviewed - Confirmed",
|
||||
"reviewed",
|
||||
"Status/Reviewed",
|
||||
"Reviewed/Confirmed",
|
||||
"Status - Reviewed",
|
||||
]
|
||||
|
||||
# Label schema detection patterns
|
||||
# Used by setup-labels command to detect existing naming conventions
|
||||
label_patterns:
|
||||
# Detect prefix-based naming (e.g., Kind/Bug, Type/Feature)
|
||||
prefix_slash: "^(Kind|Type|Category)/(.+)$"
|
||||
# Detect dash-separated naming (e.g., Priority - High, Status - Blocked)
|
||||
prefix_dash: "^(Priority|Status|Reviewed) - (.+)$"
|
||||
# Detect colon-separated naming (e.g., type: bug, priority: high)
|
||||
colon: "^(type|priority|status): (.+)$"
|
||||
|
||||
# Security scanning rules
|
||||
security:
|
||||
|
||||
Reference in New Issue
Block a user