mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 18:08:30 +02:00
Feat: interactive issue edit command (#708)
If there are no flags passed to the `issues edit` command, it prompts for changes to the properties like title, description, labels, etc. This is a follow-up to <https://gitea.com/gitea/tea/pulls/506>. Closes: <https://gitea.com/gitea/tea/issues/605> Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/708 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Co-authored-by: Vincent Neubauer <v.neubauer@darlor.de> Co-committed-by: Vincent Neubauer <v.neubauer@darlor.de>
This commit is contained in:

committed by
techknowlogick

parent
60636cd7d8
commit
57e3400f0f
@ -8,6 +8,7 @@ import (
|
||||
|
||||
"code.gitea.io/tea/cmd/flags"
|
||||
"code.gitea.io/tea/modules/context"
|
||||
"code.gitea.io/tea/modules/interact"
|
||||
"code.gitea.io/tea/modules/print"
|
||||
"code.gitea.io/tea/modules/task"
|
||||
"code.gitea.io/tea/modules/utils"
|
||||
@ -47,6 +48,14 @@ func runIssuesEdit(cmd *cli.Context) error {
|
||||
|
||||
client := ctx.Login.Client()
|
||||
for _, opts.Index = range indices {
|
||||
if ctx.NumFlags() == 0 {
|
||||
var err error
|
||||
opts, err = interact.EditIssue(*ctx, opts.Index)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
issue, err := task.EditIssue(ctx, client, *opts)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user