mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-05 18:58:43 +02:00
8e0666ab85
Reviewed-on: https://gitea.com/gitea/tea/pulls/1003 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-committed-by: techknowlogick <techknowlogick@gitea.com>
43 lines
948 B
Go
43 lines
948 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"github.com/urfave/cli/v3"
|
|
|
|
"gitea.dev/tea/cmd/labels"
|
|
)
|
|
|
|
// 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")
|
|
}
|