Fix hyphenated issue prefix detection (#199)

- update prefix/number parsing to use the last hyphen across utils and nodb paths
- add regression tests covering multi-hyphen prefixes in both packages
This commit is contained in:
Midworld Kim
2025-11-02 11:57:37 +09:00
committed by GitHub
parent b5db80c412
commit 21ab565819
4 changed files with 20 additions and 9 deletions

View File

@@ -18,6 +18,7 @@ func TestExtractIssuePrefix(t *testing.T) {
{"standard ID", "bd-123", "bd"},
{"custom prefix", "myproject-456", "myproject"},
{"hash ID", "bd-abc123def", "bd"},
{"hyphenated prefix", "alpha-beta-1", "alpha-beta"},
{"no hyphen", "nohyphen", ""},
{"empty", "", ""},
}