This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
/
commands.go
71 lines (67 loc) · 2.75 KB
/
commands.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package main
import (
"github.com/urfave/cli"
"github.com/docker/gordon/pkg/gordon"
)
func loadCommands(app *cli.App) {
app.Action = mainCmd
app.Flags = []cli.Flag{
cli.StringFlag{Name: "assigned", Value: "", Usage: "display issues assigned to <user>. Use '*' for all assigned, or 'none' for all unassigned."},
cli.StringFlag{Name: "remote", Value: gordon.GetDefaultGitRemote(), Usage: "git remote to treat as origin"},
cli.StringFlag{Name: "milestone", Value: "", Usage: "display issues inside a particular <milestone>."},
cli.BoolFlag{Name: "no-trunc", Usage: "do not truncate the issue name"},
cli.BoolFlag{Name: "verbose", Usage: "show more verbose output on actions"},
cli.IntFlag{Name: "votes", Value: -1, Usage: "display the number of votes '+1' filtered by the <number> specified."},
cli.BoolFlag{Name: "vote", Usage: "add '+1' to an specific issue."},
cli.BoolFlag{Name: "proposals", Usage: "Only show proposal issues"},
}
app.Commands = []cli.Command{
{
Name: "alru",
Usage: "Show the Age of the Least Recently Updated issue for this repo. Lower is better.",
Action: alruCmd,
},
{
Name: "repo",
Usage: "List information about the current repository",
Action: repositoryInfoCmd,
},
{
Name: "take",
Usage: "Assign an issue to your github account",
Action: takeCmd,
Flags: []cli.Flag{
cli.BoolFlag{Name: "overwrite", Usage: "overwrites a taken issue"},
},
},
{
Name: "close",
Usage: "Close an issue",
Description: "Provide the issue number for issue(s) to close for this repository",
Action: closeCmd,
Flags: []cli.Flag{},
},
{
Name: "search",
Usage: "Find issues by state and keyword.",
Action: searchCmd,
Flags: []cli.Flag{
cli.StringFlag{Name: "author", Value: "", Usage: "Finds issues created by a certain user"},
cli.StringFlag{Name: "assignee", Value: "", Usage: "Finds issues that are assigned to a certain user"},
cli.StringFlag{Name: "mentions", Value: "", Usage: "Finds issues that mention a certain user"},
cli.StringFlag{Name: "commenter", Value: "", Usage: "Finds issues that a certain user commented on"},
cli.StringFlag{Name: "involves", Value: "", Usage: "Finds issues that were either created by a certain user, assigned to that user, mention that user, or were commented on by that user"},
cli.StringFlag{Name: "labels", Value: "", Usage: "Filters issues based on their labels"},
cli.StringFlag{Name: "state", Value: "", Usage: "Filter issues based on whether they’re open or closed"},
},
},
{
Name: "auth",
Usage: "Add a github token for authentication",
Action: authCmd,
Flags: []cli.Flag{
cli.StringFlag{Name: "add", Value: "", Usage: "add new token for authentication"},
},
},
}
}