gitea-tea/cmd/labels.go

39 lines
870 B
Go
Raw Normal View History

2019-10-19 12:54:16 +02: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 12:54:16 +02:00
"code.gitea.io/tea/cmd/labels"
"github.com/urfave/cli/v2"
2019-10-19 12:54:16 +02: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 12:54:16 +02:00
Action: runLabels,
Subcommands: []*cli.Command{
&labels.CmdLabelsList,
&labels.CmdLabelCreate,
&labels.CmdLabelUpdate,
&labels.CmdLabelDelete,
2019-10-19 12:54:16 +02:00
},
}
func runLabels(ctx *cli.Context) error {
if ctx.Args().Len() == 1 {
return runLabelsDetails(ctx)
2019-10-19 12:54:16 +02:00
}
return labels.RunLabelsList(ctx)
}
2019-10-19 12:54:16 +02:00
func runLabelsDetails(ctx *cli.Context) error {
return fmt.Errorf("Not yet implemented")
2019-10-19 12:54:16 +02:00
}