Skip to content

Commit

Permalink
[#137] (merge-request) remove merge-request from docs, will leave the…
Browse files Browse the repository at this point in the history
… command around
  • Loading branch information
zaquestion committed Apr 23, 2018
1 parent 2d1a880 commit 95c1acf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions cmd/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import (
// NOTE: There is special handling for "clone" in cmd/root.go
var cloneCmd = &cobra.Command{
Use: "clone",
Short: "",
Short: "GitLab repo aware clone command",
Long: `Clone supports these shorthands
- repo
- namespace/repo`,
- namespace/repo
- namespace/group/repo`,
Run: func(cmd *cobra.Command, args []string) {
project, err := gitlab.FindProject(args[0])
if err == gitlab.ErrProjectNotFound {
Expand Down
3 changes: 0 additions & 3 deletions cmd/mergeRequest.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package cmd

import (
"fmt"
"github.com/spf13/cobra"
)

// mrCmd represents the mr command
var mergeRequestCmd = &cobra.Command{
Use: "merge-request [remote [branch]]",
Short: mrCreateCmd.Short,
Long: mrCreateCmd.Long,
Args: mrCreateCmd.Args,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("[WARN] `lab merge-request` will be deprecated by `lab mr create` before v1.0 ")
runMRCreate(cmd, args)
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var templateFuncs = template.FuncMap{
"rpad": rpad,
}

const labUsageTmpl = `{{range .Commands}}{{if (and (or .IsAvailableCommand (ne .Name "help")) (and (ne .Name "clone") (ne .Name "version")))}}
const labUsageTmpl = `{{range .Commands}}{{if (and (or .IsAvailableCommand (ne .Name "help")) (and (ne .Name "clone") (ne .Name "version") (ne .Name "merge-request")))}}
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}`

func labUsageFormat(c *cobra.Command) string {
Expand Down

0 comments on commit 95c1acf

Please sign in to comment.