Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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