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

Function BugCommentEditorInput

commands/bug/input/input.go:97–106  ·  view source on GitHub ↗

BugCommentEditorInput will open the default editor in the terminal with a template for the user to fill. The file is then processed to extract a comment.

(repo repository.RepoCommonStorage, preMessage string)

Source from the content-addressed store, hash-verified

95// BugCommentEditorInput will open the default editor in the terminal with a
96// template for the user to fill. The file is then processed to extract a comment.
97func BugCommentEditorInput(repo repository.RepoCommonStorage, preMessage string) (string, error) {
98 template := fmt.Sprintf(bugCommentTemplate, preMessage)
99
100 raw, err := input.LaunchEditorWithTemplate(repo, messageFilename, template)
101 if err != nil {
102 return "", err
103 }
104
105 return processComment(raw)
106}
107
108// BugCommentFileInput read from either from a file or from the standard input
109// and extract a message

Callers

nothing calls this directly

Calls 2

LaunchEditorWithTemplateFunction · 0.92
processCommentFunction · 0.85

Tested by

no test coverage detected