feat(types): add "enhancement" as alias for "feature" type

Support --type enhancement as an alias for --type feature when creating
issues. The normalization happens before validation to ensure consistency
across all code paths.

Closes gt-hzanoe

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/george
2026-01-16 15:44:33 -08:00
committed by Steve Yegge
parent 99d6592207
commit 9ecdc00664
6 changed files with 22 additions and 8 deletions

View File

@@ -528,6 +528,17 @@ func (t IssueType) IsValidWithCustom(customTypes []string) bool {
return false
}
// Normalize maps issue type aliases to their canonical form.
// For example, "enhancement" -> "feature".
func (t IssueType) Normalize() IssueType {
switch t {
case "enhancement":
return TypeFeature
default:
return t
}
}
// RequiredSection describes a recommended section for an issue type.
// Used by bd lint and bd create --validate for template validation.
type RequiredSection struct {