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)
| 217 | // resolving it from a comment database ID (parsed from a comment URL) when the |
| 218 | // node ID is not already known. |
| 219 | func resolveCommentNodeID(c client.DiscussionClient, repo ghrepo.Interface, opts *ViewOptions) (string, error) { |
| 220 | if opts.CommentNodeID != "" { |
| 221 | return opts.CommentNodeID, nil |
| 222 | } |
| 223 | return c.ResolveCommentNodeID(repo, opts.CommentDatabaseID) |
| 224 | } |
| 225 | |
| 226 | // needsComments returns true when the command should fetch full comment data, |
| 227 | // either because --comments was set or because --json requested the comments field. |
no test coverage detected