tea/cmd/labels.go

41 lines
917 B
Go
Raw Permalink Normal View History

2019-10-19 16:24:16 +05:30
// Copyright 2019 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
2019-10-19 16:24:16 +05:30
package cmd
import (
"fmt"
2019-10-19 16:24:16 +05:30
"code.gitea.io/tea/cmd/labels"
"github.com/urfave/cli/v2"
2019-10-19 16:24:16 +05:30
)
// 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
2019-10-19 16:24:16 +05:30
Action: runLabels,
Subcommands: []*cli.Command{
&labels.CmdLabelsList,
&labels.CmdLabelCreate,
&labels.CmdLabelUpdate,
&labels.CmdLabelDelete,
2019-10-19 16:24:16 +05:30
},
Flags: labels.CmdLabelsList.Flags,
2019-10-19 16:24:16 +05:30
}
func runLabels(ctx *cli.Context) error {
if ctx.Args().Len() == 1 {
return runLabelsDetails(ctx)
2019-10-19 16:24:16 +05:30
}
return labels.RunLabelsList(ctx)
}
2019-10-19 16:24:16 +05:30
func runLabelsDetails(ctx *cli.Context) error {
return fmt.Errorf("Not yet implemented")
2019-10-19 16:24:16 +05:30
}