fix: remove arbitrary 8-char prefix limit from rename-prefix (GH#770)
The limit wasn't enforced by init/create, so users could create issues with longer prefixes but couldn't use rename-prefix to consolidate them. Since the DB handles longer prefixes fine, just remove the limit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -188,10 +188,6 @@ func validatePrefix(prefix string) error {
|
||||
return fmt.Errorf("prefix cannot be empty")
|
||||
}
|
||||
|
||||
if len(prefix) > 8 {
|
||||
return fmt.Errorf("prefix too long (max 8 characters): %s", prefix)
|
||||
}
|
||||
|
||||
matched, _ := regexp.MatchString(`^[a-z][a-z0-9-]*$`, prefix)
|
||||
if !matched {
|
||||
return fmt.Errorf("prefix must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens: %s", prefix)
|
||||
|
||||
@@ -20,7 +20,7 @@ func TestValidatePrefix(t *testing.T) {
|
||||
{"valid with numbers", "work1-", false},
|
||||
{"valid with hyphen", "my-work-", false},
|
||||
{"empty", "", true},
|
||||
{"too long", "verylongprefix-", true},
|
||||
{"long prefix ok", "verylongprefix-", false}, // No length limit (GH#770)
|
||||
{"starts with number", "1work-", true},
|
||||
{"uppercase", "KW-", true},
|
||||
{"no hyphen", "kw", false},
|
||||
|
||||
Reference in New Issue
Block a user