mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-24 03:21:36 +01:00
16133212fc
add `times ls` Fix #242 Move `list` code into times/list.go to make it more in line with the rest of the code. add `times ls` reformatted code. Signed-off-by: Karl Heinz Marbaise <kama@soebes.de> Removed version check as suggested through the review. Co-authored-by: Karl Heinz Marbaise <kama@soebes.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/272 Reviewed-by: Norwin <noerw@noreply.gitea.io> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: khmarbaise <khmarbaise@noreply.gitea.io> Co-Committed-By: khmarbaise <khmarbaise@noreply.gitea.io>
33 lines
954 B
Go
33 lines
954 B
Go
// 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 (
|
|
"code.gitea.io/tea/cmd/times"
|
|
"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{
|
|
×.CmdTrackedTimesAdd,
|
|
×.CmdTrackedTimesDelete,
|
|
×.CmdTrackedTimesReset,
|
|
×.CmdTrackedTimesList,
|
|
},
|
|
}
|
|
|
|
func runTrackedTimes(ctx *cli.Context) error {
|
|
return times.RunTimesList(ctx)
|
|
}
|