mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-02 09:58:29 +02:00

I tested this somewhat, but I haven't been using the cli before so I'm not sure if there are changes - there shouldn't be though. Reviewed-on: https://gitea.com/gitea/tea/pulls/760 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
42 lines
951 B
Go
42 lines
951 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"code.gitea.io/tea/cmd/labels"
|
|
"github.com/urfave/cli/v3"
|
|
)
|
|
|
|
// CmdLabels represents to operate repositories' labels.
|
|
var CmdLabels = cli.Command{
|
|
Name: "labels",
|
|
Aliases: []string{"label"},
|
|
Category: catEntities,
|
|
Usage: "Manage issue labels",
|
|
Description: `Manage issue labels`,
|
|
ArgsUsage: " ", // command does not accept arguments
|
|
Action: runLabels,
|
|
Commands: []*cli.Command{
|
|
&labels.CmdLabelsList,
|
|
&labels.CmdLabelCreate,
|
|
&labels.CmdLabelUpdate,
|
|
&labels.CmdLabelDelete,
|
|
},
|
|
Flags: labels.CmdLabelsList.Flags,
|
|
}
|
|
|
|
func runLabels(ctx context.Context, cmd *cli.Command) error {
|
|
if cmd.Args().Len() == 1 {
|
|
return runLabelsDetails(cmd)
|
|
}
|
|
return labels.RunLabelsList(ctx, cmd)
|
|
}
|
|
|
|
func runLabelsDetails(cmd *cli.Command) error {
|
|
return fmt.Errorf("Not yet implemented")
|
|
}
|