Documentation ¶
Index ¶
- Constants
- Variables
- func CmdAutoRebase(cmdWrapper runner.Builder) func(*cli.Context) error
- func CmdInitConfig(c *cli.Context) error
- func CmdParse(c *cli.Context) error
- func CmdProfileAdd(c *cli.Context) error
- func CmdProfileUpdate(c *cli.Context) error
- func CmdRepoAdd(c *cli.Context) error
- func CmdRepoIgnoreBuild(c *cli.Context) error
- func CmdRepoRemove(c *cli.Context) error
- func CmdRepoRemoveIgnoredBuild(c *cli.Context) error
- func CmdRepoSetPath(c *cli.Context) error
- func CompleteAutoRebase(c *cli.Context)
- func CompleteParse(c *cli.Context)
- func CompleteProfileAdd(c *cli.Context)
- func CompleteRepoAdd(c *cli.Context)
- func CompleteRepoIgnoreBuild(c *cli.Context)
- func CompleteRepoRemove(c *cli.Context)
- func CompleteRepoRemoveIgnoredBuild(c *cli.Context)
- func CompleteRepoSetPath(c *cli.Context)
- func RootCompletion(c *cli.Context)
Constants ¶
const Name string = "prp"
Name is the name of this program
const Version string = "0.3.0"
Version is the current version
Variables ¶
var Commands = []cli.Command{ { Name: "init-config", Aliases: []string{"ic"}, Usage: "Initialize a configuration file", Action: CmdInitConfig, }, { Name: "parse", Aliases: []string{"pa"}, Usage: "Parse your pull requests", Action: CmdParse, BashComplete: CompleteParse, Flags: []cli.Flag{ cli.StringFlag{ Name: "user, owner, u", Usage: "Only show pull requests by owner.", }, cli.StringSliceFlag{ Name: "repo, r", Usage: "Only show pull requests on a repository.", }, cli.BoolFlag{ Name: "need-rebase, nr", Usage: "Only show pull requests that need a rebase.", }, cli.BoolFlag{ Name: "verbose, v", Usage: "Output more info", }, cli.BoolFlag{ Name: "use-cache, uc, c", Usage: "Use file cache", }, }, }, { Name: "profile", Aliases: []string{"pr"}, Usage: "Manage profiles", Subcommands: []cli.Command{ { Name: "add", Aliases: []string{"a"}, Usage: "Add a profile", Action: CmdProfileAdd, BashComplete: CompleteProfileAdd, Flags: profileCrudFlags, }, { Name: "update", Aliases: []string{"u"}, Usage: "Update a profile", Action: CmdProfileUpdate, BashComplete: CompleteProfileAdd, Flags: profileCrudFlags, }, }, }, { Name: "repo", Aliases: []string{"r"}, Usage: "Manage repos.", Subcommands: []cli.Command{ { Name: "add", Aliases: []string{"a"}, Usage: "Add a repo", Action: CmdRepoAdd, BashComplete: CompleteRepoAdd, }, { Name: "remove", Aliases: []string{"r"}, Usage: "Remove a repo", Action: CmdRepoRemove, BashComplete: CompleteRepoRemove, }, { Name: "ignore-build", Aliases: []string{"ib"}, Usage: "Ignore a build.", Action: CmdRepoIgnoreBuild, BashComplete: CompleteRepoIgnoreBuild, }, { Name: "remove-ignored-build", Aliases: []string{"rib"}, Usage: "Remove a build from the list of ignored builds.", Action: CmdRepoRemoveIgnoredBuild, BashComplete: CompleteRepoRemoveIgnoredBuild, }, { Name: "set-path", Aliases: []string{"sp"}, Usage: "Set the path of the local clone.", Action: CmdRepoSetPath, BashComplete: CompleteRepoSetPath, }, }, }, { Name: "auto-rebase", Aliases: []string{"a", "auto"}, Usage: "Automatically rebase your pull requests with local path set", Action: CmdAutoRebase(runner.Real{}), BashComplete: CompleteAutoRebase, Flags: []cli.Flag{ cli.StringSliceFlag{ Name: "repo, r", Usage: "Only rebase these repos.", }, cli.IntFlag{ Name: "pull-request-number, prNum, n", Usage: "A specific pull request number", }, cli.BoolFlag{ Name: "verbose, v", Usage: "Output more info", }, cli.BoolFlag{ Name: "use-cache, uc, c", Usage: "Use file cache", }, }, }, }
Commands defines the commands that can be called on hostBuilder
var GlobalFlags = []cli.Flag{ cli.StringFlag{ Name: "config, c", Usage: "The config file", EnvVar: "PRP_CONFIG_FILE", }, cli.StringFlag{ Name: "profile, p", Usage: "The current profile", Value: "default", }, }
GlobalFlags are the flags that apply to all commands
Functions ¶
func CmdAutoRebase ¶
CmdAutoRebase parses the pull requests
func CmdInitConfig ¶
CmdInitConfig creates a new config file
func CmdProfileAdd ¶
CmdProfileAdd parses the pull requests
func CmdProfileUpdate ¶
CmdProfileUpdate parses the pull requests
func CmdRepoIgnoreBuild ¶
CmdRepoIgnoreBuild parses the pull requests
func CmdRepoRemove ¶
CmdRepoRemove parses the pull requests
func CmdRepoRemoveIgnoredBuild ¶
CmdRepoRemoveIgnoredBuild parses the pull requests
func CmdRepoSetPath ¶
CmdRepoSetPath parses the pull requests
func CompleteAutoRebase ¶
CompleteAutoRebase handles bash autocompletion for the 'auto-rebase' command
func CompleteParse ¶
CompleteParse handles bash autocompletion for the 'parse' command
func CompleteProfileAdd ¶
CompleteProfileAdd handles bash autocompletion for the 'profile add' command
func CompleteRepoAdd ¶
CompleteRepoAdd handles bash autocompletion for the 'profile repo add' command
func CompleteRepoIgnoreBuild ¶
CompleteRepoIgnoreBuild handles bash autocompletion for the 'profile repo ignore-build' command
func CompleteRepoRemove ¶
CompleteRepoRemove handles bash autocompletion for the 'profile repo remove' command
func CompleteRepoRemoveIgnoredBuild ¶
CompleteRepoRemoveIgnoredBuild handles bash autocompletion for the 'profile repo remove-ignored-build' command
func CompleteRepoSetPath ¶
CompleteRepoSetPath handles bash autocompletion for the 'profile repo set-path' command
func RootCompletion ¶ added in v0.3.1
RootCompletion prints the list of root commands as the root completion method This is similar to the default method, but it excludes aliases
Types ¶
This section is empty.