1
0
mirror of https://gitea.com/gitea/tea.git synced 2024-11-03 04:27:21 -05:00
tea/cmd/labels.go

40 lines
875 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 (
"log"
"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"},
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
},
}
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 {
log.Fatal("Not yet implemented.")
2019-10-19 06:54:16 -04:00
return nil
}