mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
feat(label): edit a label in a form without flags
label edit without flags on a terminal now opens a form with the label's name, color, description and flags, like milestone edit and issue edit, instead of failing; without a terminal it reports the shared "nothing to edit" error. The help of issue and milestone close and reopen names its commands without generating the text from the verb. Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
6 files changed
+143
-8
No files matched your search
@@ -414,11 +414,11 @@ func issueTemplate(ctx context.Context, service services.Issues, name string) (s
|
||||
// changing them.
|
||||
func (a *application) issueStateCommand(verb string) *cobra.Command {
|
||||
var comment string
|
||||
state, past, completeState := "closed", "Closed", "open"
|
||||
state, past, completeState, short := "closed", "Closed", "open", "Close issues"
|
||||
if verb == "reopen" {
|
||||
state, past, completeState = "open", "Reopened", "closed"
|
||||
state, past, completeState, short = "open", "Reopened", "closed", "Reopen issues"
|
||||
}
|
||||
cmd := &cobra.Command{Use: verb + " {<number> | <url>}...", Short: titleCase(verb) + " issues", Example: fmt.Sprintf(`$ tea issue %[1]s 12
|
||||
cmd := &cobra.Command{Use: verb + " {<number> | <url>}...", Short: short, Example: fmt.Sprintf(`$ tea issue %[1]s 12
|
||||
$ tea issue %[1]s 12 13 --comment "Done in #14"`, verb), Annotations: map[string]string{"tea.arguments": issueArguments}, Args: usageArgs(cobra.MinimumNArgs(1)), RunE: func(cmd *cobra.Command, args []string) error {
|
||||
target, numbers, err := a.resolveRefs(cmd, args, issueRef)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user