From e1e58ef419fee651d6eba610126fb72095aeab89 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 5 Nov 2025 10:55:32 -0800 Subject: [PATCH] fix: Handle both string and *string for external_ref in UpdateIssue Fixes panic during import when handleRename passes ExternalRef as *string. The UpdateIssue function now accepts both string and *string for the external_ref field to match the type definition in types.Issue. --- internal/storage/sqlite/sqlite.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/storage/sqlite/sqlite.go b/internal/storage/sqlite/sqlite.go index 54bb9e37..02c88561 100644 --- a/internal/storage/sqlite/sqlite.go +++ b/internal/storage/sqlite/sqlite.go @@ -543,8 +543,15 @@ func (s *SQLiteStorage) UpdateIssue(ctx context.Context, id string, updates map[ if value == nil { updatedIssue.ExternalRef = nil } else { - str := value.(string) - updatedIssue.ExternalRef = &str + // Handle both string and *string + switch v := value.(type) { + case string: + updatedIssue.ExternalRef = &v + case *string: + updatedIssue.ExternalRef = v + default: + return fmt.Errorf("external_ref must be string or *string, got %T", value) + } } } }