(env *execenv.Env)
| 9 | ) |
| 10 | |
| 11 | func newBugCommentCommand(env *execenv.Env) *cobra.Command { |
| 12 | cmd := &cobra.Command{ |
| 13 | Use: "comment [BUG_ID]", |
| 14 | Short: "List a bug's comments", |
| 15 | PreRunE: execenv.LoadBackend(env), |
| 16 | RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error { |
| 17 | return runBugComment(env, args) |
| 18 | }), |
| 19 | ValidArgsFunction: BugCompletion(env), |
| 20 | } |
| 21 | |
| 22 | cmd.AddCommand(newBugCommentNewCommand(env)) |
| 23 | cmd.AddCommand(newBugCommentEditCommand(env)) |
| 24 | |
| 25 | return cmd |
| 26 | } |
| 27 | |
| 28 | func runBugComment(env *execenv.Env, args []string) error { |
| 29 | b, _, err := ResolveSelected(env.Backend, args) |
no test coverage detected