MCPcopy Create free account
hub / github.com/cli/cli / fromAPISession

Function fromAPISession

pkg/cmd/agent-task/capi/sessions.go:583–610  ·  view source on GitHub ↗
(s session)

Source from the content-addressed store, hash-verified

581}
582
583func fromAPISession(s session) *Session {
584 result := Session{
585 ID: s.ID,
586 Name: s.Name,
587 UserID: s.UserID,
588 AgentID: s.AgentID,
589 Logs: s.Logs,
590 State: s.State,
591 OwnerID: s.OwnerID,
592 RepoID: s.RepoID,
593 ResourceType: s.ResourceType,
594 ResourceID: s.ResourceID,
595 LastUpdatedAt: s.LastUpdatedAt,
596 CreatedAt: s.CreatedAt,
597 CompletedAt: s.CompletedAt,
598 EventURL: s.EventURL,
599 EventType: s.EventType,
600 PremiumRequests: s.PremiumRequests,
601 WorkflowRunID: s.WorkflowRunID,
602 }
603 if s.Error != nil {
604 result.Error = &SessionError{
605 Code: s.Error.Code,
606 Message: s.Error.Message,
607 }
608 }
609 return &result
610}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected