MCPcopy Index your code
hub / github.com/git-bug/git-bug / newBugLabelCommand

Function newBugLabelCommand

commands/bug/bug_label.go:9–24  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

7)
8
9func newBugLabelCommand(env *execenv.Env) *cobra.Command {
10 cmd := &cobra.Command{
11 Use: "label [BUG_ID]",
12 Short: "Display labels of a bug",
13 PreRunE: execenv.LoadBackend(env),
14 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
15 return runBugLabel(env, args)
16 }),
17 ValidArgsFunction: BugCompletion(env),
18 }
19
20 cmd.AddCommand(newBugLabelNewCommand(env))
21 cmd.AddCommand(newBugLabelRmCommand(env))
22
23 return cmd
24}
25
26func runBugLabel(env *execenv.Env, args []string) error {
27 b, _, err := ResolveSelected(env.Backend, args)

Callers 1

NewBugCommandFunction · 0.85

Calls 6

LoadBackendFunction · 0.92
CloseBackendFunction · 0.92
runBugLabelFunction · 0.85
BugCompletionFunction · 0.85
newBugLabelNewCommandFunction · 0.85
newBugLabelRmCommandFunction · 0.85

Tested by

no test coverage detected