Remove global -B, --current-branch flag
Now `pr list --base` has shorthand `-B`
This commit is contained in:
parent
b21b93abe9
commit
002aac3519
2 changed files with 2 additions and 5 deletions
|
|
@ -22,7 +22,7 @@ func init() {
|
|||
|
||||
prListCmd.Flags().IntP("limit", "L", 30, "maximum number of items to fetch")
|
||||
prListCmd.Flags().StringP("state", "s", "open", "filter by state")
|
||||
prListCmd.Flags().StringP("base", "b", "", "filter by base branch")
|
||||
prListCmd.Flags().StringP("base", "B", "", "filter by base branch")
|
||||
prListCmd.Flags().StringArrayP("label", "l", nil, "filter by label")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ var BuildDate = "YYYY-MM-DD"
|
|||
func init() {
|
||||
RootCmd.Version = fmt.Sprintf("%s (%s)", Version, BuildDate)
|
||||
RootCmd.PersistentFlags().StringP("repo", "R", "", "current GitHub repository")
|
||||
RootCmd.PersistentFlags().StringP("current-branch", "B", "", "current git branch")
|
||||
// TODO:
|
||||
// RootCmd.PersistentFlags().BoolP("verbose", "V", false, "enable verbose output")
|
||||
|
||||
|
|
@ -55,9 +54,7 @@ func contextForCommand(cmd *cobra.Command) context.Context {
|
|||
ctx := initContext()
|
||||
if repo, err := cmd.Flags().GetString("repo"); err == nil && repo != "" {
|
||||
ctx.SetBaseRepo(repo)
|
||||
}
|
||||
if branch, err := cmd.Flags().GetString("current-branch"); err == nil && branch != "" {
|
||||
ctx.SetBranch(branch)
|
||||
ctx.SetBranch("master")
|
||||
}
|
||||
return ctx
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue