1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-12-04 14:46:40 -05:00
tea/cmd/labels.go

41 lines
933 B
Go
Raw Normal View History

2019-10-19 06:54:16 -04:00
// Copyright 2019 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package cmd
import (
"fmt"
2019-10-19 06:54:16 -04:00
"code.gitea.io/tea/cmd/labels"
"github.com/urfave/cli/v2"
2019-10-19 06:54:16 -04:00
)
// 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`,
2019-10-19 06:54:16 -04:00
Action: runLabels,
Subcommands: []*cli.Command{
&labels.CmdLabelsList,
&labels.CmdLabelCreate,
&labels.CmdLabelUpdate,
&labels.CmdLabelDelete,
2019-10-19 06:54:16 -04:00
},
Flags: labels.CmdLabelsList.Flags,
2019-10-19 06:54:16 -04:00
}
func runLabels(ctx *cli.Context) error {
if ctx.Args().Len() == 1 {
return runLabelsDetails(ctx)
2019-10-19 06:54:16 -04:00
}
return labels.RunLabelsList(ctx)
}
2019-10-19 06:54:16 -04:00
func runLabelsDetails(ctx *cli.Context) error {
return fmt.Errorf("Not yet implemented")
2019-10-19 06:54:16 -04:00
}