(p Prompt, state *IssueMetadataState, templateContent string)
| 90 | } |
| 91 | |
| 92 | func BodySurvey(p Prompt, state *IssueMetadataState, templateContent string) error { |
| 93 | if templateContent != "" { |
| 94 | if state.Body != "" { |
| 95 | // prevent excessive newlines between default body and template |
| 96 | state.Body = strings.TrimRight(state.Body, "\n") |
| 97 | state.Body += "\n\n" |
| 98 | } |
| 99 | state.Body += templateContent |
| 100 | } |
| 101 | |
| 102 | result, err := p.MarkdownEditor("Body", state.Body, true) |
| 103 | if err != nil { |
| 104 | return err |
| 105 | } |
| 106 | |
| 107 | if state.Body != result { |
| 108 | state.MarkDirty() |
| 109 | } |
| 110 | |
| 111 | state.Body = result |
| 112 | |
| 113 | return nil |
| 114 | } |
| 115 | |
| 116 | func TitleSurvey(p Prompt, io *iostreams.IOStreams, state *IssueMetadataState) error { |
| 117 | var err error |
no test coverage detected