MCPcopy Index your code
hub / github.com/cli/cli / fromAPISession

Function fromAPISession

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

Source from the content-addressed store, hash-verified

572}
573
574func fromAPISession(s session) *Session {
575 result := Session{
576 ID: s.ID,
577 Name: s.Name,
578 UserID: s.UserID,
579 AgentID: s.AgentID,
580 Logs: s.Logs,
581 State: s.State,
582 OwnerID: s.OwnerID,
583 RepoID: s.RepoID,
584 ResourceType: s.ResourceType,
585 ResourceID: s.ResourceID,
586 LastUpdatedAt: s.LastUpdatedAt,
587 CreatedAt: s.CreatedAt,
588 CompletedAt: s.CompletedAt,
589 EventURL: s.EventURL,
590 EventType: s.EventType,
591 PremiumRequests: s.PremiumRequests,
592 WorkflowRunID: s.WorkflowRunID,
593 }
594 if s.Error != nil {
595 result.Error = &SessionError{
596 Code: s.Error.Code,
597 Message: s.Error.Message,
598 }
599 }
600 return &result
601}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected