bd-210: Delete dead code file import_phases.go

- Removed cmd/bd/import_phases.go (377 LOC of unreachable code)
- Moved helper functions extractPrefix and getPrefixList to import_shared.go
- All tests pass
- Import functionality verified
This commit is contained in:
Steve Yegge
2025-10-27 20:34:58 -07:00
parent 243438773a
commit f3617c8abd
3 changed files with 840 additions and 377 deletions

View File

@@ -401,3 +401,28 @@ func isNumeric(s string) bool {
}
return true
}
// extractPrefix extracts the prefix from an issue ID (e.g., "bd-123" -> "bd")
func extractPrefix(issueID string) string {
parts := strings.SplitN(issueID, "-", 2)
if len(parts) < 2 {
return "" // No prefix found
}
return parts[0]
}
// getPrefixList formats a map of prefix counts into a sorted list of strings
func getPrefixList(prefixes map[string]int) []string {
var result []string
keys := make([]string, 0, len(prefixes))
for k := range prefixes {
keys = append(keys, k)
}
sort.Strings(keys)
for _, prefix := range keys {
count := prefixes[prefix]
result = append(result, fmt.Sprintf("%s- (%d issues)", prefix, count))
}
return result
}