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

Function newBugRmCommand

commands/bug/bug_rm.go:11–27  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

9)
10
11func newBugRmCommand(env *execenv.Env) *cobra.Command {
12 cmd := &cobra.Command{
13 Use: "rm BUG_ID",
14 Short: "Remove an existing bug",
15 Long: "Remove an existing bug in the local repository. Note removing bugs that were imported from bridges will not remove the bug on the remote, and will only remove the local copy of the bug.",
16 PreRunE: execenv.LoadBackendEnsureUser(env),
17 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
18 return runBugRm(env, args)
19 }),
20 ValidArgsFunction: BugCompletion(env),
21 }
22
23 flags := cmd.Flags()
24 flags.SortFlags = false
25
26 return cmd
27}
28
29func runBugRm(env *execenv.Env, args []string) (err error) {
30 if len(args) == 0 {

Callers 1

NewBugCommandFunction · 0.85

Calls 4

LoadBackendEnsureUserFunction · 0.92
CloseBackendFunction · 0.92
runBugRmFunction · 0.85
BugCompletionFunction · 0.85

Tested by

no test coverage detected