diff --git a/internal/storage/sqlite/batch_ops.go b/internal/storage/sqlite/batch_ops.go index 69e31ee5..a3e13631 100644 --- a/internal/storage/sqlite/batch_ops.go +++ b/internal/storage/sqlite/batch_ops.go @@ -16,13 +16,6 @@ func validateBatchIssues(issues []*types.Issue) error { return validateBatchIssuesWithCustom(issues, nil, nil) } -// validateBatchIssuesWithCustomStatuses validates all issues in a batch, -// allowing custom statuses in addition to built-in ones. -// Deprecated: Use validateBatchIssuesWithCustom instead. -func validateBatchIssuesWithCustomStatuses(issues []*types.Issue, customStatuses []string) error { - return validateBatchIssuesWithCustom(issues, customStatuses, nil) -} - // validateBatchIssuesWithCustom validates all issues in a batch, // allowing custom statuses and types in addition to built-in ones. func validateBatchIssuesWithCustom(issues []*types.Issue, customStatuses, customTypes []string) error { @@ -257,14 +250,18 @@ func (s *SQLiteStorage) CreateIssuesWithFullOptions(ctx context.Context, issues return nil } - // Fetch custom statuses for validation + // Fetch custom statuses and types for validation customStatuses, err := s.GetCustomStatuses(ctx) if err != nil { return fmt.Errorf("failed to get custom statuses: %w", err) } + customTypes, err := s.GetCustomTypes(ctx) + if err != nil { + return fmt.Errorf("failed to get custom types: %w", err) + } - // Phase 1: Validate all issues first (fail-fast, with custom status support) - if err := validateBatchIssuesWithCustomStatuses(issues, customStatuses); err != nil { + // Phase 1: Validate all issues first (fail-fast, with custom status and type support) + if err := validateBatchIssuesWithCustom(issues, customStatuses, customTypes); err != nil { return err }