times

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdTrackedTimesAdd = cli.Command{
	Name:      "add",
	Aliases:   []string{"a"},
	Usage:     "Track spent time on an issue",
	UsageText: "tea times add <issue> <duration>",
	Description: `Track spent time on an issue
	 Example:
		tea times add 1 1h25m
	`,
	Action: runTrackedTimesAdd,
	Flags:  flags.LoginRepoFlags,
}

CmdTrackedTimesAdd represents a sub command of times to add time to an issue

View Source
var CmdTrackedTimesDelete = cli.Command{
	Name:      "delete",
	Aliases:   []string{"rm"},
	Usage:     "Delete a single tracked time on an issue",
	UsageText: "tea times delete <issue> <time ID>",
	Action:    runTrackedTimesDelete,
	Flags:     flags.LoginRepoFlags,
}

CmdTrackedTimesDelete is a sub command of CmdTrackedTimes, and removes time from an issue

View Source
var CmdTrackedTimesList = cli.Command{
	Name:    "list",
	Aliases: []string{"ls"},
	Action:  RunTimesList,
	Usage:   "List tracked times on issues & pulls",
	Description: `List tracked times, across repos, or on a single repo or issue:
- given a username all times on a repo by that user are shown,
- given a issue index with '#' prefix, all times on that issue are listed,
- given --mine, your times are listed across all repositories.
Depending on your permissions on the repository, only your own tracked times might be listed.`,
	ArgsUsage: "[username | #issue]",

	Flags: append([]cli.Flag{
		&cli.StringFlag{
			Name:    "from",
			Aliases: []string{"f"},
			Usage:   "Show only times tracked after this date",
		},
		&cli.StringFlag{
			Name:    "until",
			Aliases: []string{"u"},
			Usage:   "Show only times tracked before this date",
		},
		&cli.BoolFlag{
			Name:    "total",
			Aliases: []string{"t"},
			Usage:   "Print the total duration at the end",
		},
		&cli.BoolFlag{
			Name:    "mine",
			Aliases: []string{"m"},
			Usage:   "Show all times tracked by you across all repositories (overrides command arguments)",
		},
		&cli.StringFlag{
			Name: "fields",
			Usage: fmt.Sprintf(`Comma-separated list of fields to print. Available values:
			%s
		`, strings.Join(print.TrackedTimeFields, ",")),
		},
	}, flags.AllDefaultFlags...),
}

CmdTrackedTimesList represents a sub command of times to list them

View Source
var CmdTrackedTimesReset = cli.Command{
	Name:      "reset",
	Usage:     "Reset tracked time on an issue",
	UsageText: "tea times reset <issue>",
	Action:    runTrackedTimesReset,
	Flags:     flags.LoginRepoFlags,
}

CmdTrackedTimesReset is a subcommand of CmdTrackedTimes, and clears all tracked times on an issue.

Functions

func RunTimesList

func RunTimesList(cmd *cli.Context) error

RunTimesList list repositories

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL