File: variable.go

package info (click to toggle)
glab 1.53.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,936 kB
  • sloc: sh: 295; makefile: 153; perl: 99; ruby: 68; javascript: 67
file content (30 lines) | stat: -rw-r--r-- 994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package variable

import (
	"github.com/spf13/cobra"
	"gitlab.com/gitlab-org/cli/commands/cmdutils"
	deleteCmd "gitlab.com/gitlab-org/cli/commands/variable/delete"
	exportCmd "gitlab.com/gitlab-org/cli/commands/variable/export"
	getCmd "gitlab.com/gitlab-org/cli/commands/variable/get"
	listCmd "gitlab.com/gitlab-org/cli/commands/variable/list"
	setCmd "gitlab.com/gitlab-org/cli/commands/variable/set"
	updateCmd "gitlab.com/gitlab-org/cli/commands/variable/update"
)

func NewVariableCmd(f *cmdutils.Factory) *cobra.Command {
	cmd := &cobra.Command{
		Use:     "variable",
		Short:   "Manage variables for a GitLab project or group.",
		Aliases: []string{"var"},
	}

	cmdutils.EnableRepoOverride(cmd, f)

	cmd.AddCommand(setCmd.NewCmdSet(f, nil))
	cmd.AddCommand(listCmd.NewCmdList(f, nil))
	cmd.AddCommand(deleteCmd.NewCmdDelete(f, nil))
	cmd.AddCommand(updateCmd.NewCmdUpdate(f, nil))
	cmd.AddCommand(getCmd.NewCmdGet(f, nil))
	cmd.AddCommand(exportCmd.NewCmdExport(f, nil))
	return cmd
}