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

Function resolveCommentNodeID

pkg/cmd/discussion/view/view.go:224–229  ·  view source on GitHub ↗

resolveCommentNodeID returns the comment node ID for the current invocation, resolving it from a comment database ID (parsed from a comment URL) when the node ID is not already known.

(c client.DiscussionClient, repo ghrepo.Interface, opts *ViewOptions)

Source from the content-addressed store, hash-verified

222// resolving it from a comment database ID (parsed from a comment URL) when the
223// node ID is not already known.
224func resolveCommentNodeID(c client.DiscussionClient, repo ghrepo.Interface, opts *ViewOptions) (string, error) {
225 if opts.CommentNodeID != "" {
226 return opts.CommentNodeID, nil
227 }
228 return c.ResolveCommentNodeID(repo, opts.CommentDatabaseID)
229}
230
231// needsComments returns true when the command should fetch full comment data,
232// either because --comments was set or because --json requested the comments field.

Callers 1

viewRunFunction · 0.85

Calls 1

ResolveCommentNodeIDMethod · 0.65

Tested by

no test coverage detected