MCPcopy Create free account
hub / github.com/cli/cli / CommentableEditSurvey

Function CommentableEditSurvey

pkg/cmd/pr/shared/commentable.go:432–440  ·  view source on GitHub ↗
(cf func() (gh.Config, error), io *iostreams.IOStreams)

Source from the content-addressed store, hash-verified

430}
431
432func CommentableEditSurvey(cf func() (gh.Config, error), io *iostreams.IOStreams) func(string) (string, error) {
433 return func(initialValue string) (string, error) {
434 editorCommand, err := cmdutil.DetermineEditor(cf)
435 if err != nil {
436 return "", err
437 }
438 return surveyext.Edit(editorCommand, "*.md", initialValue, io.In, io.Out, io.ErrOut)
439 }
440}
441
442func CommentableConfirmDeleteLastComment(p Prompt) func(string) (bool, error) {
443 return func(body string) (bool, error) {

Callers 1

NewCmdCommentFunction · 0.92

Calls 2

DetermineEditorFunction · 0.92
EditFunction · 0.92

Tested by

no test coverage detected