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

Function newBugTitleEditCommand

commands/bug/bug_title_edit.go:16–38  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

14}
15
16func newBugTitleEditCommand(env *execenv.Env) *cobra.Command {
17 options := bugTitleEditOptions{}
18
19 cmd := &cobra.Command{
20 Use: "edit [BUG_ID]",
21 Short: "Edit a title of a bug",
22 PreRunE: execenv.LoadBackendEnsureUser(env),
23 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
24 return runBugTitleEdit(env, options, args)
25 }),
26 ValidArgsFunction: BugCompletion(env),
27 }
28
29 flags := cmd.Flags()
30 flags.SortFlags = false
31
32 flags.StringVarP(&options.title, "title", "t", "",
33 "Provide a title to describe the issue",
34 )
35 flags.BoolVar(&options.nonInteractive, "non-interactive", false, "Do not ask for user input")
36
37 return cmd
38}
39
40func runBugTitleEdit(env *execenv.Env, opts bugTitleEditOptions, args []string) error {
41 b, _, err := ResolveSelected(env.Backend, args)

Callers 1

newBugTitleCommandFunction · 0.85

Calls 4

LoadBackendEnsureUserFunction · 0.92
CloseBackendFunction · 0.92
runBugTitleEditFunction · 0.85
BugCompletionFunction · 0.85

Tested by

no test coverage detected