mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: reconcile the issues stream and remove the legacy output shims
Use one canPrompt and pullNumberArguments for the comment commands, set display preferences instead of the retired environment variables in tests, and delete writeList, writeItem, batch, table, writeRecord(s), the legacy column map, confirm, require, validateMilestoneFlags and listWindow now that every command uses their replacements. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
13 files changed
+23
-172
No files matched your search
@@ -4,7 +4,6 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
@@ -113,8 +112,8 @@ func (a *application) readComment(cmd *cobra.Command, f commentFlags, initial st
|
||||
|
||||
// promptComment asks for a comment in the configured editor, or in a multi-line field without one.
|
||||
func (a *application) promptComment(cmd *cobra.Command, initial string) (string, terminal.Draft, error) {
|
||||
if prompt, err := a.canPrompt(); err != nil || !prompt {
|
||||
return "", terminal.Draft{}, cmp.Or(err, clierr.Wrap(clierr.Usage, errors.New("missing required input: supply --body, --body-file or --editor")))
|
||||
if !a.canPrompt() {
|
||||
return "", terminal.Draft{}, clierr.Wrap(clierr.Usage, errors.New("missing required input: supply --body, --body-file or --editor"))
|
||||
}
|
||||
if preferences, err := a.preferences(); err == nil && preferences.Editor != "" {
|
||||
draft, err := a.editDraft(cmd, initial)
|
||||
|
||||
Reference in new issue
Block a user