Skip to content

Commit

Permalink
add alias new for issue and merge request creation fix #216
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDelille committed Oct 21, 2018
1 parent e801a97 commit f5e1c4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions cmd/issue_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import (
)

var issueCreateCmd = &cobra.Command{
Use: "create [remote]",
Short: "Open an issue on GitLab",
Long: ``,
Args: cobra.MaximumNArgs(1),
Use: "create [remote]",
Aliases: []string{"new"},
Short: "Open an issue on GitLab",
Long: ``,
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
msgs, err := cmd.Flags().GetStringSlice("message")
if err != nil {
Expand Down
11 changes: 6 additions & 5 deletions cmd/mr_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ import (

// mrCmd represents the mr command
var mrCreateCmd = &cobra.Command{
Use: "create [remote [branch]]",
Short: "Open a merge request on GitLab",
Long: `Creates a merge request (MR created on origin master by default)`,
Args: cobra.MaximumNArgs(2),
Run: runMRCreate,
Use: "create [remote [branch]]",
Aliases: []string{"new"},
Short: "Open a merge request on GitLab",
Long: `Creates a merge request (MR created on origin master by default)`,
Args: cobra.MaximumNArgs(2),
Run: runMRCreate,
}

func init() {
Expand Down

0 comments on commit f5e1c4b

Please sign in to comment.