Add repoflag to pr commands
This commit is contained in:
parent
dd8cbccbd5
commit
6a02ad3f1b
3 changed files with 9 additions and 0 deletions
|
|
@ -27,16 +27,22 @@ func init() {
|
|||
prCmd.AddCommand(prCheckoutCmd)
|
||||
prCmd.AddCommand(prCreateCmd)
|
||||
prCmd.AddCommand(prStatusCmd)
|
||||
includeRepoFlag(prStatusCmd)
|
||||
prCmd.AddCommand(prCloseCmd)
|
||||
includeRepoFlag(prCloseCmd)
|
||||
prCmd.AddCommand(prReopenCmd)
|
||||
includeRepoFlag(prReopenCmd)
|
||||
prCmd.AddCommand(prMergeCmd)
|
||||
includeRepoFlag(prMergeCmd)
|
||||
prMergeCmd.Flags().BoolP("delete-branch", "d", true, "Delete the local and remote branch after merge")
|
||||
prMergeCmd.Flags().BoolP("merge", "m", false, "Merge the commits with the base branch")
|
||||
prMergeCmd.Flags().BoolP("rebase", "r", false, "Rebase the commits onto the base branch")
|
||||
prMergeCmd.Flags().BoolP("squash", "s", false, "Squash the commits into one commit and merge it into the base branch")
|
||||
prCmd.AddCommand(prReadyCmd)
|
||||
includeRepoFlag(prReadyCmd)
|
||||
|
||||
prCmd.AddCommand(prListCmd)
|
||||
includeRepoFlag(prListCmd)
|
||||
prListCmd.Flags().IntP("limit", "L", 30, "Maximum number of items to fetch")
|
||||
prListCmd.Flags().StringP("state", "s", "open", "Filter by state: {open|closed|merged|all}")
|
||||
prListCmd.Flags().StringP("base", "B", "", "Filter by base branch")
|
||||
|
|
@ -44,6 +50,7 @@ func init() {
|
|||
prListCmd.Flags().StringP("assignee", "a", "", "Filter by assignee")
|
||||
|
||||
prCmd.AddCommand(prViewCmd)
|
||||
includeRepoFlag(prViewCmd)
|
||||
prViewCmd.Flags().BoolP("web", "w", false, "Open a pull request in the browser")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ func init() {
|
|||
prDiffCmd.Flags().StringP("color", "c", "auto", "Whether or not to output color: {always|never|auto}")
|
||||
|
||||
prCmd.AddCommand(prDiffCmd)
|
||||
includeRepoFlag(prDiffCmd)
|
||||
}
|
||||
|
||||
func prDiff(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import (
|
|||
|
||||
func init() {
|
||||
prCmd.AddCommand(prReviewCmd)
|
||||
includeRepoFlag(prCmd)
|
||||
|
||||
prReviewCmd.Flags().BoolP("approve", "a", false, "Approve pull request")
|
||||
prReviewCmd.Flags().BoolP("request-changes", "r", false, "Request changes on a pull request")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue