github.com/zaquestion/lab@v0.25.1/cmd/merge_request.go (about)

     1  package cmd
     2  
     3  import (
     4  	"github.com/rsteube/carapace"
     5  	"github.com/spf13/cobra"
     6  	"github.com/zaquestion/lab/internal/action"
     7  )
     8  
     9  var mergeRequestCmd = &cobra.Command{
    10  	Use:              "merge-request [remote [branch]]",
    11  	Deprecated:       "use the `mr create` command instead",
    12  	Short:            mrCreateCmd.Short,
    13  	Long:             mrCreateCmd.Long,
    14  	Args:             mrCreateCmd.Args,
    15  	PersistentPreRun: labPersistentPreRun,
    16  	Run: func(cmd *cobra.Command, args []string) {
    17  		runMRCreate(cmd, args)
    18  	},
    19  }
    20  
    21  func init() {
    22  	RootCmd.AddCommand(mergeRequestCmd)
    23  	carapace.Gen(mergeRequestCmd).PositionalCompletion(
    24  		action.Remotes(),
    25  		action.RemoteBranches(0),
    26  	)
    27  }