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.
This commit is contained in:
Steve Yegge
2025-11-05 10:55:32 -08:00
parent 8c5e51e3e6
commit e1e58ef419

View File

@@ -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)
}
}
}
}