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

Function printRawReplies

pkg/cmd/discussion/view/view.go:649–660  ·  view source on GitHub ↗

printRawReplies writes the replies of a comment as a sequence of metadata blocks, without any fields of the parent comment. Replies are printed in chronological order regardless of how they were fetched.

(out io.Writer, c *client.DiscussionComment)

Source from the content-addressed store, hash-verified

647// blocks, without any fields of the parent comment. Replies are printed in
648// chronological order regardless of how they were fetched.
649func printRawReplies(out io.Writer, c *client.DiscussionComment) error {
650 replies := slices.Clone(c.Replies.Comments)
651 if c.Replies.Direction == client.DiscussionCommentListDirectionBackward {
652 slices.Reverse(replies)
653 }
654
655 for _, reply := range replies {
656 printRawComment(out, reply)
657 }
658
659 return nil
660}

Callers 1

viewRunFunction · 0.85

Calls 2

printRawCommentFunction · 0.85
CloneMethod · 0.65

Tested by

no test coverage detected