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:
committed by
Steve Yegge
parent
99d6592207
commit
9ecdc00664
@@ -28,8 +28,10 @@ func ParsePriority(content string) int {
|
||||
|
||||
// ParseIssueType extracts and validates an issue type from content.
|
||||
// Returns the validated type or error if invalid.
|
||||
// Supports type aliases like "enhancement" -> "feature".
|
||||
func ParseIssueType(content string) (types.IssueType, error) {
|
||||
issueType := types.IssueType(strings.TrimSpace(content))
|
||||
// Normalize to support aliases like "enhancement" -> "feature"
|
||||
issueType := types.IssueType(strings.TrimSpace(content)).Normalize()
|
||||
|
||||
// Use the canonical IsValid() from types package
|
||||
if !issueType.IsValid() {
|
||||
|
||||
Reference in New Issue
Block a user