fix: support multi-part prefixes in issue ID extraction (#398)
This commit is contained in:
@@ -42,14 +42,18 @@ func TestExtractPrefix(t *testing.T) {
|
||||
{"bd-123", "bd"},
|
||||
{"custom-1", "custom"},
|
||||
{"TEST-999", "TEST"},
|
||||
{"no-number", "no"}, // Has hyphen, so "no" is prefix
|
||||
{"no-number", "no"}, // Has hyphen, suffix not numeric, first hyphen
|
||||
{"nonumber", ""}, // No hyphen
|
||||
{"", ""},
|
||||
// Multi-part suffixes (bd-fasa regression tests)
|
||||
// Multi-part non-numeric suffixes (bd-fasa regression tests)
|
||||
{"vc-baseline-test", "vc"},
|
||||
{"vc-92cl-gate-test", "vc"},
|
||||
{"bd-multi-part-id", "bd"},
|
||||
{"prefix-a-b-c-d", "prefix"},
|
||||
// Multi-part prefixes with numeric suffixes
|
||||
{"beads-vscode-1", "beads-vscode"},
|
||||
{"alpha-beta-123", "alpha-beta"},
|
||||
{"my-project-42", "my-project"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
||||
Reference in New Issue
Block a user