ValidateIDPrefixAllowed compared the raw dbPrefix against id via HasPrefix(id, dbPrefix+"-"), so a config.issue_prefix stored with a trailing hyphen (e.g. "bd-") produced "bd--" and threw a false "prefix mismatch" on bd create. The allowedPrefixes branch already normalized each entry with TrimSuffix(allowed, "-"); this applies the same normalization to dbPrefix. Also fixes the error message (shows 'bd-' not 'bd--'). Adds trailing-hyphen regression cases. Fixes #4208 Co-authored-by: kevglynn <kevglynn@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| bead.go | ||
| bead_test.go | ||
| issue.go | ||
| issue_test.go | ||
| template.go | ||
| template_test.go | ||