BugCreateEditorInput will open the default editor in the terminal with a template for the user to fill. The file is then processed to extract title and message.
(repo repository.RepoCommonStorage, preTitle string, preMessage string)
| 30 | // template for the user to fill. The file is then processed to extract title |
| 31 | // and message. |
| 32 | func BugCreateEditorInput(repo repository.RepoCommonStorage, preTitle string, preMessage string) (string, string, error) { |
| 33 | if preMessage != "" { |
| 34 | preMessage = "\n\n" + preMessage |
| 35 | } |
| 36 | |
| 37 | template := fmt.Sprintf(bugTitleCommentTemplate, preTitle, preMessage) |
| 38 | |
| 39 | raw, err := input.LaunchEditorWithTemplate(repo, messageFilename, template) |
| 40 | if err != nil { |
| 41 | return "", "", err |
| 42 | } |
| 43 | |
| 44 | return processCreate(raw) |
| 45 | } |
| 46 | |
| 47 | // BugCreateFileInput read from either from a file or from the standard input |
| 48 | // and extract a title and a message |
nothing calls this directly
no test coverage detected