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

Function resolveCommentNodeID

pkg/cmd/discussion/view/view.go:226–231  ·  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

224// resolving it from a comment database ID (parsed from a comment URL) when the
225// node ID is not already known.
226func resolveCommentNodeID(c client.DiscussionClient, repo ghrepo.Interface, opts *ViewOptions) (string, error) {
227 if opts.CommentNodeID != "" {
228 return opts.CommentNodeID, nil
229 }
230 return c.ResolveCommentNodeID(repo, opts.CommentDatabaseID)
231}
232
233// needsComments returns true when the command should fetch full comment data,
234// 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