Skip to content

Commit

Permalink
fix(mr): Allow only one argument to mr commands
Browse files Browse the repository at this point in the history
  • Loading branch information
zemzale committed Nov 22, 2020
1 parent 6b004ed commit acf0b3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions commands/mr/close/mr_close.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func NewCmdClose(f *cmdutils.Factory) *cobra.Command {
Use: "close [<id> | <branch>]",
Short: `Close merge requests`,
Long: ``,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
var err error
apiClient, err := f.HttpClient()
Expand Down
1 change: 1 addition & 0 deletions commands/mr/delete/mr_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func NewCmdDelete(f *cmdutils.Factory) *cobra.Command {
Use: "delete [<id> | <branch>]",
Short: `Delete merge requests`,
Long: ``,
Args: cobra.MaximumNArgs(1),
Aliases: []string{"del"},
Example: "$ glab delete 123",
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down
1 change: 1 addition & 0 deletions commands/mr/reopen/mr_reopen.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func NewCmdReopen(f *cmdutils.Factory) *cobra.Command {
Use: "reopen [<id> | <branch>]",
Short: `Reopen merge requests`,
Long: ``,
Args: cobra.MaximumNArgs(1),
Aliases: []string{"open"},
RunE: func(cmd *cobra.Command, args []string) error {
apiClient, err := f.HttpClient()
Expand Down

0 comments on commit acf0b3e

Please sign in to comment.