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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user