needsComments returns true when the command should fetch full comment data, either because --comments was set or because --json requested the comments field.
(opts *ViewOptions)
| 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. |
| 228 | func needsComments(opts *ViewOptions) bool { |
| 229 | return opts.Comments || (opts.Exporter != nil && slices.Contains(opts.Exporter.Fields(), "comments")) |
| 230 | } |
| 231 | |
| 232 | func viewRun(opts *ViewOptions) error { |
| 233 | repo, err := opts.BaseRepo() |
no test coverage detected