2020-03-05 22:43:28 -05:00
|
|
|
// Copyright 2020 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 (
|
2020-09-30 01:11:33 -04:00
|
|
|
"code.gitea.io/tea/cmd/times"
|
2020-03-05 22:43:28 -05:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
// CmdTrackedTimes represents the command to operate repositories' times.
|
|
|
|
var CmdTrackedTimes = cli.Command{
|
|
|
|
Name: "times",
|
|
|
|
Aliases: []string{"time"},
|
|
|
|
Usage: "Operate on tracked times of a repository's issues & pulls",
|
|
|
|
Description: `Operate on tracked times of a repository's issues & pulls.
|
|
|
|
Depending on your permissions on the repository, only your own tracked
|
|
|
|
times might be listed.`,
|
|
|
|
ArgsUsage: "[username | #issue]",
|
|
|
|
Action: runTrackedTimes,
|
|
|
|
Subcommands: []*cli.Command{
|
2020-09-30 01:11:33 -04:00
|
|
|
×.CmdTrackedTimesAdd,
|
|
|
|
×.CmdTrackedTimesDelete,
|
|
|
|
×.CmdTrackedTimesReset,
|
2020-12-07 07:29:48 -05:00
|
|
|
×.CmdTrackedTimesList,
|
2020-03-05 22:43:28 -05:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func runTrackedTimes(ctx *cli.Context) error {
|
2020-12-07 07:29:48 -05:00
|
|
|
return times.RunTimesList(ctx)
|
2020-03-05 22:43:28 -05:00
|
|
|
}
|