fix(types): consolidate enhancement alias and fix update command

- Add "enhancement" to util.issueTypeAliases for consistency
- Make types.IssueType.Normalize() case-insensitive and include all aliases
- Fix update.go to normalize type before validation
- Remove duplicate type validation block in update.go

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/george
2026-01-16 16:02:43 -08:00
committed by Steve Yegge
parent 62dd5f8585
commit aee86dfae2
3 changed files with 15 additions and 15 deletions

View File

@@ -529,11 +529,16 @@ func (t IssueType) IsValidWithCustom(customTypes []string) bool {
}
// Normalize maps issue type aliases to their canonical form.
// For example, "enhancement" -> "feature".
// For example, "enhancement" -> "feature", "mr" -> "merge-request".
// Case-insensitive to match util.NormalizeIssueType behavior.
func (t IssueType) Normalize() IssueType {
switch t {
case "enhancement":
switch strings.ToLower(string(t)) {
case "enhancement", "feat":
return TypeFeature
case "mr":
return TypeMergeRequest
case "mol":
return TypeMolecule
default:
return t
}