bd sync: 2025-11-09 14:53:59

This commit is contained in:
Steve Yegge
2025-11-09 14:53:59 -08:00
parent d482d9ea6e
commit 83472aca3d
9 changed files with 288 additions and 143 deletions

View File

@@ -628,6 +628,7 @@ func attemptAutoMerge(conflictedPath string) error {
}
// detectPrefixFromIssues extracts the common prefix from issue IDs
// Only considers the first hyphen, so "vc-baseline-test" -> "vc"
func detectPrefixFromIssues(issues []*types.Issue) string {
if len(issues) == 0 {
return ""
@@ -636,10 +637,10 @@ func detectPrefixFromIssues(issues []*types.Issue) string {
// Count prefix occurrences
prefixCounts := make(map[string]int)
for _, issue := range issues {
// Extract prefix from issue ID (e.g., "bd-123" -> "bd")
parts := strings.SplitN(issue.ID, "-", 2)
if len(parts) == 2 {
prefixCounts[parts[0]]++
// Extract prefix from issue ID using first hyphen only
idx := strings.Index(issue.ID, "-")
if idx > 0 {
prefixCounts[issue.ID[:idx]]++
}
}