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

Function fromAPISession

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

Source from the content-addressed store, hash-verified

554}
555
556func fromAPISession(s session) *Session {
557 result := Session{
558 ID: s.ID,
559 Name: s.Name,
560 UserID: s.UserID,
561 AgentID: s.AgentID,
562 Logs: s.Logs,
563 State: s.State,
564 OwnerID: s.OwnerID,
565 RepoID: s.RepoID,
566 ResourceType: s.ResourceType,
567 ResourceID: s.ResourceID,
568 LastUpdatedAt: s.LastUpdatedAt,
569 CreatedAt: s.CreatedAt,
570 CompletedAt: s.CompletedAt,
571 EventURL: s.EventURL,
572 EventType: s.EventType,
573 PremiumRequests: s.PremiumRequests,
574 WorkflowRunID: s.WorkflowRunID,
575 }
576 if s.Error != nil {
577 result.Error = &SessionError{
578 Code: s.Error.Code,
579 Message: s.Error.Message,
580 }
581 }
582 return &result
583}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected