fix: support multi-part prefixes in issue ID extraction (#398)

This commit is contained in:
Kris Hansen
2025-11-26 17:42:14 -08:00
committed by GitHub
parent 0d32c6e982
commit 9931ac9bd9
7 changed files with 104 additions and 23 deletions

View File

@@ -18,7 +18,9 @@ func TestExtractIssuePrefix(t *testing.T) {
{"standard ID", "bd-123", "bd"},
{"custom prefix", "myproject-456", "myproject"},
{"hash ID", "bd-abc123def", "bd"},
{"multi-part suffix", "alpha-beta-1", "alpha"}, // Only first hyphen (bd-fasa)
{"multi-part prefix with numeric suffix", "alpha-beta-1", "alpha-beta"},
{"multi-part non-numeric suffix", "vc-baseline-test", "vc"}, // Falls back to first hyphen
{"beads-vscode style", "beads-vscode-42", "beads-vscode"},
{"no hyphen", "nohyphen", ""},
{"empty", "", ""},
}