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

Function mapActorFromListNode

pkg/cmd/discussion/client/client.go:86–96  ·  view source on GitHub ↗

mapActorFromListNode converts an actorNode into the domain DiscussionActor type.

(n actorNode)

Source from the content-addressed store, hash-verified

84
85// mapActorFromListNode converts an actorNode into the domain DiscussionActor type.
86func mapActorFromListNode(n actorNode) DiscussionActor {
87 a := DiscussionActor{Login: n.Login}
88 switch n.TypeName {
89 case "User":
90 a.ID = n.User.ID
91 a.Name = n.User.Name
92 case "Bot":
93 a.ID = n.Bot.ID
94 }
95 return a
96}
97
98// discussionListNode is the GraphQL response shape for a discussion in
99// list and search results. It covers high-level fields only (no comments, or

Callers 7

mapReplyFromNodeFunction · 0.85
mapCommentFromNodeFunction · 0.85
GetCommentRepliesMethod · 0.85
AddCommentMethod · 0.85
UpdateCommentMethod · 0.85
GetCommentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected