mirror of
https://gitea.com/gitea/tea
synced 2024-11-26 06:07:38 +01:00
846fb3072a
Refactor tea labels command Fix #278 Signed-off-by: Karl Heinz Marbaise <kama@soebes.de> Refactor tea labels command - fixed formatting code. Co-authored-by: Karl Heinz Marbaise <kama@soebes.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/282 Reviewed-by: 6543 <6543@obermui.de> Reviewed-by: Norwin <noerw@noreply.gitea.io> Co-Authored-By: khmarbaise <khmarbaise@noreply.gitea.io> Co-Committed-By: khmarbaise <khmarbaise@noreply.gitea.io>
40 lines
875 B
Go
40 lines
875 B
Go
// 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"
|
|
)
|
|
|
|
// CmdLabels represents to operate repositories' labels.
|
|
var CmdLabels = cli.Command{
|
|
Name: "labels",
|
|
Aliases: []string{"label"},
|
|
Usage: "Manage issue labels",
|
|
Description: `Manage issue labels`,
|
|
Action: runLabels,
|
|
Subcommands: []*cli.Command{
|
|
&labels.CmdLabelsList,
|
|
&labels.CmdLabelCreate,
|
|
&labels.CmdLabelUpdate,
|
|
&labels.CmdLabelDelete,
|
|
},
|
|
}
|
|
|
|
func runLabels(ctx *cli.Context) error {
|
|
if ctx.Args().Len() == 1 {
|
|
return runLabelsDetails(ctx)
|
|
}
|
|
return labels.RunLabelsList(ctx)
|
|
}
|
|
|
|
func runLabelsDetails(ctx *cli.Context) error {
|
|
log.Fatal("Not yet implemented.")
|
|
return nil
|
|
}
|