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:
Steve Yegge
2025-12-27 22:24:14 -08:00
parent aa4da74fd1
commit ab3feda007
2 changed files with 1 additions and 5 deletions

View File

@@ -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)

View File

@@ -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},