MCPcopy
hub / github.com/cli/cli / CommentableEditSurvey

Function CommentableEditSurvey

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

Source from the content-addressed store, hash-verified

331}
332
333func CommentableEditSurvey(cf func() (gh.Config, error), io *iostreams.IOStreams) func(string) (string, error) {
334 return func(initialValue string) (string, error) {
335 editorCommand, err := cmdutil.DetermineEditor(cf)
336 if err != nil {
337 return "", err
338 }
339 return surveyext.Edit(editorCommand, "*.md", initialValue, io.In, io.Out, io.ErrOut)
340 }
341}
342
343func CommentableConfirmDeleteLastComment(p Prompt) func(string) (bool, error) {
344 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