glab: updates from v1.56.0

This commit is contained in:
rsteube 2025-04-28 20:49:00 +02:00
parent 8b579f0820
commit 03e346d5de
52 changed files with 577 additions and 29 deletions

View File

@ -0,0 +1,31 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/net"
"github.com/carapace-sh/carapace-bin/pkg/actions/net/ssh"
"github.com/spf13/cobra"
)
var auth_dpopGenCmd = &cobra.Command{
Use: "dpop-gen [flags]",
Short: "Generates a DPoP (demonstrating-proof-of-possession) proof JWT. (Experimental.)",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(auth_dpopGenCmd).Standalone()
auth_dpopGenCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitLab instance to authenticate with. Defaults to 'gitlab.com'.")
auth_dpopGenCmd.Flags().String("pat", "", "Personal Access Token (PAT) to generate a DPoP proof for. Defaults to the token set with 'glab auth login'. Returns an error if both are empty.")
auth_dpopGenCmd.Flags().StringP("private-key", "p", "", "Location of the private SSH key on the local system.")
authCmd.AddCommand(auth_dpopGenCmd)
carapace.Gen(auth_dpopGenCmd).FlagCompletion(carapace.ActionMap{
"hostname": net.ActionHosts(),
"private-key": carapace.Batch(
ssh.ActionPrivateKeys(),
carapace.ActionFiles(),
).ToA(),
})
}

View File

@ -15,13 +15,19 @@ var auth_loginCmd = &cobra.Command{
func init() {
carapace.Gen(auth_loginCmd).Standalone()
auth_loginCmd.Flags().StringP("api-host", "a", "", "API host url.")
auth_loginCmd.Flags().StringP("api-protocol", "p", "", "API protocol: https, http")
auth_loginCmd.Flags().StringP("git-protocol", "g", "", "Git protocol: ssh, https, http")
auth_loginCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitLab instance to authenticate with.")
auth_loginCmd.Flags().StringP("job-token", "j", "", "CI job token.")
auth_loginCmd.Flags().Bool("stdin", false, "Read token from standard input.")
auth_loginCmd.Flags().StringP("token", "t", "", "Your GitLab access token.")
auth_loginCmd.Flags().Bool("use-keyring", false, "Store token in your operating system's keyring.")
authCmd.AddCommand(auth_loginCmd)
carapace.Gen(auth_loginCmd).FlagCompletion(carapace.ActionMap{
"hostname": action.ActionConfigHosts(),
"api-protocol": carapace.ActionValues("https", "http"),
"git-protocol": carapace.ActionValues("ssh", "https", "http"),
"hostname": action.ActionConfigHosts(),
})
}

View File

@ -0,0 +1,24 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var auth_logoutCmd = &cobra.Command{
Use: "logout",
Short: "Logout from a GitLab instance.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(auth_logoutCmd).Standalone()
auth_logoutCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitLab instance.")
authCmd.AddCommand(auth_logoutCmd)
carapace.Gen(auth_logoutCmd).FlagCompletion(carapace.ActionMap{
"hostname": action.ActionConfigHosts(),
})
}

View File

@ -0,0 +1,18 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var ci_cancelCmd = &cobra.Command{
Use: "cancel <command>",
Short: "Cancel a running pipeline or job.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(ci_cancelCmd).Standalone()
ciCmd.AddCommand(ci_cancelCmd)
}

View File

@ -0,0 +1,21 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var ci_cancel_jobCmd = &cobra.Command{
Use: "job <id> [flags]",
Short: "Cancel CI/CD jobs.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(ci_cancel_jobCmd).Standalone()
ci_cancel_jobCmd.Flags().Bool("dry-run", false, "Simulates process, but does not cancel anything.")
ci_cancelCmd.AddCommand(ci_cancel_jobCmd)
// TODO complete job ids
}

View File

@ -0,0 +1,21 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var ci_cancel_pipelineCmd = &cobra.Command{
Use: "pipeline <id> [flags]",
Short: "Cancel CI/CD pipelines.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(ci_cancel_pipelineCmd).Standalone()
ci_cancel_pipelineCmd.Flags().Bool("dry-run", false, "Simulates process, but does not cancel anything.")
ci_cancelCmd.AddCommand(ci_cancel_pipelineCmd)
// TODO complete pipeline ids
}

View File

@ -16,7 +16,7 @@ var ci_getCmd = &cobra.Command{
func init() {
carapace.Gen(ci_getCmd).Standalone()
ci_getCmd.Flags().StringP("branch", "b", "", "Check pipeline status for a branch. (Default: current branch)")
ci_getCmd.Flags().StringP("branch", "b", "", "Check pipeline status for a branch. (default current branch)")
ci_getCmd.Flags().StringP("output", "F", "", "Format output. Options: text, json.")
ci_getCmd.Flags().StringP("output-format", "o", "", "Use output.")
ci_getCmd.Flags().StringP("pipeline-id", "p", "", "Provide pipeline ID.")

View File

@ -14,14 +14,24 @@ var ci_listCmd = &cobra.Command{
func init() {
carapace.Gen(ci_listCmd).Standalone()
ci_listCmd.Flags().StringP("name", "n", "", "Return only pipelines with the given name.")
ci_listCmd.Flags().StringP("orderBy", "o", "", "Order pipelines by this field. Options: id, status, ref, updated_at, user_id.")
ci_listCmd.Flags().StringP("output", "F", "", "Format output. Options: text, json.")
ci_listCmd.Flags().StringP("page", "p", "", "Page number.")
ci_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
ci_listCmd.Flags().StringP("ref", "r", "", "Return only pipelines for given ref.")
ci_listCmd.Flags().String("scope", "", "Return only pipelines with the given scope: {running|pending|finished|branches|tags}")
ci_listCmd.Flags().String("sha", "", "Return only pipelines with the given SHA.")
ci_listCmd.Flags().String("sort", "", "Sort pipelines. Options: asc, desc.")
ci_listCmd.Flags().StringP("status", "s", "", "Get pipeline with this status. Options: running, pending, success, failed, canceled, skipped, created, manual, waiting_for_resource, preparing, scheduled}")
ci_listCmd.Flags().String("source", "", "Return only pipelines triggered via the given source. See https://docs.gitlab.com/ee/ci/jobs/job_rules.html#ci_pipeline_source-predefined-variable for full list. Commonly used options: {merge_request_event|parent_pipeline|pipeline|push|trigger}")
ci_listCmd.Flags().StringP("status", "s", "", "Get pipeline with this status. Options: running, pending, success, failed, canceled, skipped, created, manual, waiting_for_resource, preparing, scheduled")
ci_listCmd.Flags().StringP("updated-after", "a", "", "Return only pipelines updated after the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).")
ci_listCmd.Flags().StringP("updated-before", "b", "", "Return only pipelines updated before the specified date. Expected in ISO 8601 format (2019-03-15T08:00:00Z).")
ci_listCmd.Flags().StringP("username", "u", "", "Return only pipelines triggered by the given username.")
ci_listCmd.Flags().BoolP("yaml-errors", "y", false, "Return only pipelines with invalid configurations.")
ciCmd.AddCommand(ci_listCmd)
// TODO complete new flags
carapace.Gen(ci_listCmd).FlagCompletion(carapace.ActionMap{
"orderBy": carapace.ActionValues("id", "status", "ref", "updated_at", "user_id"),
"output": carapace.ActionValues("text", "json"),

View File

@ -15,7 +15,7 @@ var ci_retryCmd = &cobra.Command{
func init() {
carapace.Gen(ci_retryCmd).Standalone()
ci_retryCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. Default: current branch.")
ci_retryCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. (default current branch)")
ci_retryCmd.Flags().StringP("pipeline-id", "p", "", "The pipeline ID to search for the job.")
ciCmd.AddCommand(ci_retryCmd)

View File

@ -23,6 +23,7 @@ func init() {
ci_runCmd.Flags().StringSlice("variables-env", []string{}, "Pass variables to pipeline in format <key>:<value>.")
ci_runCmd.Flags().StringSlice("variables-file", []string{}, "Pass file contents as a file variable to pipeline in format <key>:<filename>.")
ci_runCmd.Flags().StringP("variables-from", "f", "", "JSON file containing variables for pipeline execution.")
ci_runCmd.Flags().BoolP("web", "w", false, "Open pipeline in a browser. Uses default browser, or browser specified in BROWSER environment variable.")
ciCmd.AddCommand(ci_runCmd)
carapace.Gen(ci_runCmd).FlagCompletion(carapace.ActionMap{

View File

@ -16,7 +16,7 @@ var ci_statusCmd = &cobra.Command{
func init() {
carapace.Gen(ci_statusCmd).Standalone()
ci_statusCmd.Flags().StringP("branch", "b", "", "Check pipeline status for a branch. Default: current branch.")
ci_statusCmd.Flags().StringP("branch", "b", "", "Check pipeline status for a branch. (default current branch)")
ci_statusCmd.Flags().BoolP("compact", "c", false, "Show status in compact format.")
ci_statusCmd.Flags().BoolP("live", "l", false, "Show status in real time until the pipeline ends.")
ciCmd.AddCommand(ci_statusCmd)

View File

@ -15,11 +15,13 @@ var ci_traceCmd = &cobra.Command{
func init() {
carapace.Gen(ci_traceCmd).Standalone()
ci_traceCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. Default: current branch.")
ci_traceCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. (default current branch)")
ci_traceCmd.Flags().StringP("pipeline-id", "p", "", "The pipeline ID to search for the job.")
ciCmd.AddCommand(ci_traceCmd)
carapace.Gen(ci_statusCmd).FlagCompletion(carapace.ActionMap{
"branch": action.ActionBranches(ci_statusCmd),
})
// TODO complete job ids
}

View File

@ -15,7 +15,7 @@ var ci_triggerCmd = &cobra.Command{
func init() {
carapace.Gen(ci_triggerCmd).Standalone()
ci_triggerCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. Default: current branch.")
ci_triggerCmd.Flags().StringP("branch", "b", "", "The branch to search for the job. (default current branch)")
ci_triggerCmd.Flags().StringP("pipeline-id", "p", "", "The pipeline ID to search for the job.")
ciCmd.AddCommand(ci_triggerCmd)
@ -23,4 +23,6 @@ func init() {
"branch": action.ActionBranches(ci_triggerCmd),
"pipeline-id": action.ActionPipelines(ci_triggerCmd, ""),
})
// TODO complete job ids
}

View File

@ -15,6 +15,10 @@ var cluster_agent_bootstrapCmd = &cobra.Command{
func init() {
carapace.Gen(cluster_agent_bootstrapCmd).Standalone()
cluster_agent_bootstrapCmd.Flags().Bool("create-environment", false, "Create an Environment for the GitLab Agent.")
cluster_agent_bootstrapCmd.Flags().String("environment-flux-resource-path", "", "Flux Resource Path of the Environment for the GitLab Agent.")
cluster_agent_bootstrapCmd.Flags().String("environment-name", "", "Name of the Environment for the GitLab Agent.")
cluster_agent_bootstrapCmd.Flags().String("environment-namespace", "", "Kubernetes namespace of the Environment for the GitLab Agent.")
cluster_agent_bootstrapCmd.Flags().String("flux-source-name", "", "Flux source name.")
cluster_agent_bootstrapCmd.Flags().String("flux-source-namespace", "", "Flux source namespace.")
cluster_agent_bootstrapCmd.Flags().String("flux-source-type", "", "Source type of the flux-system, e.g. git, oci, helm, ...")
@ -23,6 +27,8 @@ func init() {
cluster_agent_bootstrapCmd.Flags().String("helm-release-name", "", "Name of the Flux HelmRelease manifest.")
cluster_agent_bootstrapCmd.Flags().String("helm-release-namespace", "", "Namespace of the Flux HelmRelease manifest.")
cluster_agent_bootstrapCmd.Flags().String("helm-release-target-namespace", "", "Namespace of the GitLab Agent deployment.")
cluster_agent_bootstrapCmd.Flags().StringSlice("helm-release-values", []string{}, "Local path to values.yaml files")
cluster_agent_bootstrapCmd.Flags().StringSlice("helm-release-values-from", []string{}, "Kubernetes object reference that contains the values.yaml data key in the format '<kind>/<name>', where kind must be one of: (Secret,ConfigMap)")
cluster_agent_bootstrapCmd.Flags().String("helm-repository-filepath", "", "Filepath within the GitLab Agent project to commit the Flux HelmRepository to.")
cluster_agent_bootstrapCmd.Flags().String("helm-repository-name", "", "Name of the Flux HelmRepository manifest.")
cluster_agent_bootstrapCmd.Flags().String("helm-repository-namespace", "", "Namespace of the Flux HelmRepository manifest.")

View File

@ -7,7 +7,7 @@ import (
var configCmd = &cobra.Command{
Use: "config [flags]",
Short: "Set and get glab settings.",
Short: "Manage glab settings.",
Aliases: []string{"conf"},
Run: func(cmd *cobra.Command, args []string) {},
}

View File

@ -0,0 +1,19 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var config_editCmd = &cobra.Command{
Use: "edit",
Short: "Opens the glab configuration file.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(config_editCmd).Standalone()
config_editCmd.Flags().BoolP("local", "l", false, "Open '.git/glab-cli/config.yml' file instead of the global '~/.config/glab-cli/config.yml' file.")
configCmd.AddCommand(config_editCmd)
}

View File

@ -15,7 +15,7 @@ var config_getCmd = &cobra.Command{
func init() {
carapace.Gen(config_getCmd).Standalone()
config_getCmd.Flags().BoolP("global", "g", false, "Read from global config file (~/.config/glab-cli/config.yml). Default: checks 'Environment variables → Local → Global'.")
config_getCmd.Flags().BoolP("global", "g", false, "Read from global config file (~/.config/glab-cli/config.yml). (default checks 'Environment variables → Local → Global')")
config_getCmd.Flags().StringP("host", "h", "", "Get per-host setting.")
configCmd.AddCommand(config_getCmd)

View File

@ -21,13 +21,14 @@ func init() {
incident_listCmd.Flags().String("author", "", "Filter incident by author <username>.")
incident_listCmd.Flags().BoolP("closed", "c", false, "Get only closed incidents.")
incident_listCmd.Flags().BoolP("confidential", "C", false, "Filter by confidential incidents.")
incident_listCmd.Flags().StringP("epic", "e", "", "List issues belonging to a given epic (requires --group, no pagination support).")
incident_listCmd.PersistentFlags().StringP("group", "g", "", "Select a group or subgroup. Ignored if a repo argument is set.")
incident_listCmd.Flags().String("in", "", "search in: title, description.")
incident_listCmd.Flags().StringSliceP("label", "l", []string{}, "Filter incident by label <name>.")
incident_listCmd.Flags().StringP("milestone", "m", "", "Filter incident by milestone <id>.")
incident_listCmd.Flags().BoolP("mine", "M", false, "Filter only incidents assigned to me.")
incident_listCmd.Flags().StringSlice("not-assignee", []string{}, "Filter incident by not being assigneed to <username>.")
incident_listCmd.Flags().StringSlice("not-author", []string{}, "Filter by not being by author(s) <username>.")
incident_listCmd.Flags().String("not-assignee", "", "Filter incident by not being assigned to <username>.")
incident_listCmd.Flags().String("not-author", "", "Filter incident by not being by author(s) <username>.")
incident_listCmd.Flags().StringSlice("not-label", []string{}, "Filter incident by lack of label <name>.")
incident_listCmd.Flags().BoolP("opened", "o", false, "Get only open incidents.")
incident_listCmd.Flags().StringP("output", "O", "", "Options: 'text' or 'json'.")
@ -40,6 +41,7 @@ func init() {
incident_listCmd.Flag("opened").Hidden = true
incidentCmd.AddCommand(incident_listCmd)
// TODO complete epic
carapace.Gen(incident_listCmd).FlagCompletion(carapace.ActionMap{
"assignee": action.ActionProjectMembers(incident_listCmd),
"author": action.ActionUsers(incident_listCmd),

View File

@ -17,7 +17,7 @@ func init() {
carapace.Gen(issue_createCmd).Standalone()
issue_createCmd.Flags().StringSliceP("assignee", "a", []string{}, "Assign issue to people by their `usernames`.")
issue_createCmd.Flags().BoolP("confidential", "c", false, "Set an issue to be confidential. Default: false.")
issue_createCmd.Flags().BoolP("confidential", "c", false, "Set an issue to be confidential. (default false)")
issue_createCmd.Flags().StringP("description", "d", "", "Issue description.")
issue_createCmd.Flags().String("due-date", "", "A date in 'YYYY-MM-DD' format.")
issue_createCmd.Flags().String("epic", "", "ID of the epic to add the issue to.")
@ -26,7 +26,7 @@ func init() {
issue_createCmd.Flags().StringSlice("linked-issues", []string{}, "The IIDs of issues that this issue links to.")
issue_createCmd.Flags().String("linked-mr", "", "The IID of a merge request in which to resolve all issues.")
issue_createCmd.Flags().StringP("milestone", "m", "", "The global ID or title of a milestone to assign.")
issue_createCmd.Flags().Bool("no-editor", false, "Don't open editor to enter a description. If set to true, uses prompt. Default: false.")
issue_createCmd.Flags().Bool("no-editor", false, "Don't open editor to enter a description. If set to true, uses prompt. (default false)")
issue_createCmd.Flags().Bool("recover", false, "Save the options to a file if the issue fails to be created. If the file exists, the options will be loaded from the recovery file. (EXPERIMENTAL.)")
issue_createCmd.Flags().StringP("time-estimate", "e", "", "Set time estimate for the issue.")
issue_createCmd.Flags().StringP("time-spent", "s", "", "Set time spent for the issue.")

View File

@ -21,14 +21,16 @@ func init() {
issue_listCmd.Flags().String("author", "", "Filter issue by author <username>.")
issue_listCmd.Flags().BoolP("closed", "c", false, "Get only closed issues.")
issue_listCmd.Flags().BoolP("confidential", "C", false, "Filter by confidential issues.")
issue_listCmd.Flags().StringP("epic", "e", "", "List issues belonging to a given epic (requires --group, no pagination support).")
issue_listCmd.PersistentFlags().StringP("group", "g", "", "Select a group or subgroup. Ignored if a repo argument is set.")
issue_listCmd.Flags().String("in", "", "search in: title, description.")
issue_listCmd.Flags().StringP("issue-type", "t", "", "Filter issue by its type. Options: issue, incident, test_case.")
issue_listCmd.Flags().StringP("iteration", "i", "", "Filter issue by iteration <id>.")
issue_listCmd.Flags().StringSliceP("label", "l", []string{}, "Filter issue by label <name>.")
issue_listCmd.Flags().StringP("milestone", "m", "", "Filter issue by milestone <id>.")
issue_listCmd.Flags().BoolP("mine", "M", false, "Filter only issues assigned to me.")
issue_listCmd.Flags().StringSlice("not-assignee", []string{}, "Filter issue by not being assigneed to <username>.")
issue_listCmd.Flags().StringSlice("not-author", []string{}, "Filter by not being by author(s) <username>.")
issue_listCmd.Flags().String("not-assignee", "", "Filter issue by not being assigned to <username>.")
issue_listCmd.Flags().String("not-author", "", "Filter issue by not being by author(s) <username>.")
issue_listCmd.Flags().StringSlice("not-label", []string{}, "Filter issue by lack of label <name>.")
issue_listCmd.Flags().BoolP("opened", "o", false, "Get only open issues.")
issue_listCmd.Flags().StringP("output", "O", "", "Options: 'text' or 'json'.")
@ -41,6 +43,7 @@ func init() {
issue_listCmd.Flag("opened").Hidden = true
issueCmd.AddCommand(issue_listCmd)
// TODO complete epic, iteration
carapace.Gen(issue_listCmd).FlagCompletion(carapace.ActionMap{
"assignee": action.ActionProjectMembers(issue_listCmd),
"author": action.ActionUsers(issue_listCmd),

View File

@ -26,6 +26,7 @@ func init() {
issue_updateCmd.Flags().Bool("unassign", false, "Unassign all users.")
issue_updateCmd.Flags().StringSliceP("unlabel", "u", []string{}, "Remove labels.")
issue_updateCmd.Flags().Bool("unlock-discussion", false, "Unlock discussion on issue.")
issue_updateCmd.Flags().StringP("weight", "w", "", "Set weight of the issue.")
issueCmd.AddCommand(issue_updateCmd)
carapace.Gen(issue_updateCmd).FlagCompletion(carapace.ActionMap{

View File

@ -0,0 +1,18 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var label_deleteCmd = &cobra.Command{
Use: "delete [flags]",
Short: "Delete labels for a repository or project.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(label_deleteCmd).Standalone()
labelCmd.AddCommand(label_deleteCmd)
}

View File

@ -15,11 +15,13 @@ var label_listCmd = &cobra.Command{
func init() {
carapace.Gen(label_listCmd).Standalone()
label_listCmd.Flags().StringP("group", "g", "", "List labels for a group.")
label_listCmd.Flags().StringP("output", "F", "", "Format output as: text, json.")
label_listCmd.Flags().StringP("page", "p", "", "Page number.")
label_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
labelCmd.AddCommand(label_listCmd)
// TODO complete group
carapace.Gen(label_listCmd).FlagCompletion(carapace.ActionMap{
"output": carapace.ActionValues("text", "json"),
})

View File

@ -17,6 +17,7 @@ func init() {
carapace.Gen(mr_diffCmd).Standalone()
mr_diffCmd.Flags().String("color", "", "Use color in diff output: always, never, auto.")
mr_diffCmd.Flags().Bool("raw", false, "Use raw diff format that can be piped to commands")
mrCmd.AddCommand(mr_diffCmd)
carapace.Gen(mr_diffCmd).FlagCompletion(carapace.ActionMap{

View File

@ -3,6 +3,7 @@ package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)
@ -26,14 +27,17 @@ func init() {
mr_listCmd.Flags().BoolP("merged", "M", false, "Get only merged merge requests.")
mr_listCmd.Flags().StringP("milestone", "m", "", "Filter merge request by milestone <id>.")
mr_listCmd.Flags().Bool("mine", false, "Get only merge requests assigned to me.")
mr_listCmd.Flags().Bool("not-draft", false, "Filter by non-draft merge requests.")
mr_listCmd.Flags().StringSlice("not-label", []string{}, "Filter merge requests by not having label <name>.")
mr_listCmd.Flags().BoolP("opened", "O", false, "Get only open merge requests.")
mr_listCmd.Flags().StringP("order", "o", "", "Order merge requests by <field>. Order options: created_at, title, merged_at or updated_at.")
mr_listCmd.Flags().StringP("output", "F", "", "Format output as: text, json.")
mr_listCmd.Flags().StringP("page", "p", "", "Page number.")
mr_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
mr_listCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
mr_listCmd.Flags().StringSliceP("reviewer", "r", []string{}, "Get only merge requests with users as reviewer.")
mr_listCmd.Flags().String("search", "", "Filter by <string> in title and description.")
mr_listCmd.Flags().StringP("sort", "S", "", "Sort merge requests by <field>. Sort options: asc, desc.")
mr_listCmd.Flags().StringP("source-branch", "s", "", "Filter by source branch <name>.")
mr_listCmd.Flags().StringP("target-branch", "t", "", "Filter by target branch <name>.")
mr_listCmd.Flag("mine").Hidden = true
@ -47,8 +51,10 @@ func init() {
"label": action.ActionLabels(mr_listCmd).UniqueList(","),
"milestone": action.ActionMilestones(mr_listCmd),
"not-label": action.ActionLabels(mr_listCmd).UniqueList(","),
"order": carapace.ActionValues("created_at", "title", "merged_at", "updated_at"),
"repo": action.ActionRepo(mr_listCmd),
"reviewer": action.ActionProjectMembers(mr_listCmd).UniqueList(","),
"sort": carapace.ActionValues("asc", "desc").StyleF(style.ForKeyword),
"source-branch": action.ActionBranches(mr_listCmd),
"target-branch": action.ActionBranches(mr_listCmd),
})

View File

@ -16,18 +16,25 @@ func init() {
carapace.Gen(release_createCmd).Standalone()
release_createCmd.Flags().StringP("assets-links", "a", "", "'JSON' string representation of assets links, like `--assets-links='[{\"name\": \"Asset1\", \"url\":\"https://<domain>/some/location/1\", \"link_type\": \"other\", \"direct_asset_path\": \"path/to/file\"}]'.`")
release_createCmd.Flags().String("experimental-notes-text-or-file", "", "[EXPERIMENTAL] Value to use as release notes. If a file exists with this value as path, its content will be used. Otherwise, the value itself will be used as text.")
release_createCmd.Flags().StringSliceP("milestone", "m", []string{}, "The title of each milestone the release is associated with.")
release_createCmd.Flags().StringP("name", "n", "", "The release name or title.")
release_createCmd.Flags().Bool("no-close-milestone", false, "Prevent closing milestones after creating the release.")
release_createCmd.Flags().Bool("no-update", false, "Prevent updating the existing release.")
release_createCmd.Flags().StringP("notes", "N", "", "The release notes or description. You can use Markdown.")
release_createCmd.Flags().StringP("notes-file", "F", "", "Read release notes 'file'. Specify '-' as the value to read from stdin.")
release_createCmd.Flags().Bool("publish-to-catalog", false, "[EXPERIMENTAL] Publish the release to the GitLab CI/CD catalog.")
release_createCmd.Flags().StringP("ref", "r", "", "If the specified tag doesn't exist, the release is created from ref and tagged with the specified tag name. It can be a commit SHA, another tag name, or a branch name.")
release_createCmd.Flags().StringP("released-at", "D", "", "The 'date' when the release was ready. Defaults to the current datetime. Expects ISO 8601 format (2019-03-15T08:00:00Z).")
release_createCmd.Flags().StringP("tag-message", "T", "", "Message to use if creating a new annotated tag.")
release_createCmd.Flag("experimental-notes-text-or-file").Hidden = true
releaseCmd.AddCommand(release_createCmd)
carapace.Gen(release_createCmd).FlagCompletion(carapace.ActionMap{
"milestone": action.ActionMilestones(release_createCmd),
"notes-file": carapace.ActionFiles(),
"ref": action.ActionBranches(release_createCmd), // TODO refs
"experimental-notes-text-or-file": carapace.ActionFiles(),
"milestone": action.ActionMilestones(release_createCmd),
"notes-file": carapace.ActionFiles(),
"ref": action.ActionBranches(release_createCmd), // TODO refs
// TODO released-at
})

View File

@ -7,7 +7,7 @@ import (
)
var repo_cloneCmd = &cobra.Command{
Use: "clone <repo> [flags] [<dir>] [-- [<gitflags>...]]",
Use: "clone <repo> [flags] [<dir>] [-- <gitflags>...]",
Short: "Clone a GitLab repository or project.",
Run: func(cmd *cobra.Command, args []string) {},
}

View File

@ -24,6 +24,7 @@ func init() {
repo_createCmd.Flags().BoolP("public", "P", false, "Make project public: visible without any authentication.")
repo_createCmd.Flags().Bool("readme", false, "Initialize project with `README.md`.")
repo_createCmd.Flags().String("remoteName", "", "Remote name for the Git repository you're in. Defaults to `origin` if not provided.")
repo_createCmd.Flags().BoolP("skipGitInit", "s", false, "Skip run 'git init'.")
repo_createCmd.Flags().StringSliceP("tag", "t", []string{}, "The list of tags for the project.")
repoCmd.AddCommand(repo_createCmd)

View File

@ -2,6 +2,7 @@ package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
@ -16,7 +17,7 @@ func init() {
carapace.Gen(repo_listCmd).Standalone()
repo_listCmd.Flags().BoolP("all", "a", false, "List all projects on the instance.")
repo_listCmd.Flags().Bool("archived", false, "Limit by archived status. Used with the '--group' flag.")
repo_listCmd.Flags().Bool("archived", false, "Limit by archived status. Use 'false' to exclude archived repositories. Used with the '--group' flag.")
repo_listCmd.Flags().StringP("group", "g", "", "Return repositories in only the given group.")
repo_listCmd.Flags().BoolP("include-subgroups", "G", false, "Include projects in subgroups of this group. Default is false. Used with the '--group' flag.")
repo_listCmd.Flags().Bool("member", false, "List only projects of which you are a member.")
@ -27,11 +28,13 @@ func init() {
repo_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
repo_listCmd.Flags().StringP("sort", "s", "", "Return repositories sorted in asc or desc order.")
repo_listCmd.Flags().Bool("starred", false, "List only starred projects.")
repo_listCmd.Flags().StringP("user", "u", "", "List user projects.")
repoCmd.AddCommand(repo_listCmd)
carapace.Gen(repo_listCmd).FlagCompletion(carapace.ActionMap{
"order": carapace.ActionValues("id", "name", "path", "created_at", "updated_at", "last_activity_at", "repository_size", "storage_size", "packages_size", "wiki_size"),
"output": carapace.ActionValues("text", "json"),
"sort": carapace.ActionValues("asc", "desc"),
"user": action.ActionUsers(repo_listCmd),
})
}

View File

@ -0,0 +1,18 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var repo_publishCmd = &cobra.Command{
Use: "publish <command> [flags]",
Short: "Publishes resources in the project.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(repo_publishCmd).Standalone()
repoCmd.AddCommand(repo_publishCmd)
}

View File

@ -0,0 +1,23 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var repo_publish_catalogCmd = &cobra.Command{
Use: "catalog <tag-name>",
Short: "[EXPERIMENTAL] Publishes CI/CD components to the catalog.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(repo_publish_catalogCmd).Standalone()
repo_publishCmd.AddCommand(repo_publish_catalogCmd)
carapace.Gen(repo_publishCmd).PositionalCompletion(
action.ActionTags(repo_publishCmd),
)
}

View File

@ -15,8 +15,13 @@ var repo_searchCmd = &cobra.Command{
func init() {
carapace.Gen(repo_searchCmd).Standalone()
repo_searchCmd.Flags().StringP("output", "F", "", "Format output as: text, json.")
repo_searchCmd.Flags().StringP("page", "p", "", "Page number.")
repo_searchCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
repo_searchCmd.Flags().StringP("search", "s", "", "A string contained in the project name.")
repoCmd.AddCommand(repo_searchCmd)
carapace.Gen(repo_searchCmd).FlagCompletion(carapace.ActionMap{
"output": carapace.ActionValues("text", "json"),
})
}

View File

@ -6,7 +6,7 @@ import (
)
var schedule_deleteCmd = &cobra.Command{
Use: "delete [flags]",
Use: "delete <id> [flags]",
Short: "Delete the schedule with the specified ID.",
Run: func(cmd *cobra.Command, args []string) {},
}

View File

@ -0,0 +1,28 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var schedule_updateCmd = &cobra.Command{
Use: "update <id> [flags]",
Short: "Update a pipeline schedule.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(schedule_updateCmd).Standalone()
schedule_updateCmd.Flags().Bool("active", false, "Whether or not the schedule is active.")
schedule_updateCmd.Flags().StringSlice("create-variable", []string{}, "Pass new variables to schedule in format <key>:<value>.")
schedule_updateCmd.Flags().String("cron", "", "Cron interval pattern.")
schedule_updateCmd.Flags().String("cronTimeZone", "", "Cron timezone.")
schedule_updateCmd.Flags().StringSlice("delete-variable", []string{}, "Pass variables you want to delete from schedule in format <key>.")
schedule_updateCmd.Flags().String("description", "", "Description of the schedule.")
schedule_updateCmd.Flags().String("ref", "", "Target branch or tag.")
schedule_updateCmd.Flags().StringSlice("update-variable", []string{}, "Pass updated variables to schedule in format <key>:<value>.")
scheduleCmd.AddCommand(schedule_updateCmd)
// TODO add completions
}

View File

@ -0,0 +1,24 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var securefileCmd = &cobra.Command{
Use: "securefile <command> [flags]",
Short: "Manage secure files for a project.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(securefileCmd).Standalone()
securefileCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
rootCmd.AddCommand(securefileCmd)
carapace.Gen(securefileCmd).FlagCompletion(carapace.ActionMap{
"repo": action.ActionRepo(securefileCmd),
})
}

View File

@ -0,0 +1,24 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var securefile_createCmd = &cobra.Command{
Use: "create <fileName> <inputFilePath>",
Short: "Create a new project secure file.",
Aliases: []string{"upload"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(securefile_createCmd).Standalone()
securefileCmd.AddCommand(securefile_createCmd)
carapace.Gen(securefile_createCmd).PositionalCompletion(
carapace.ActionFiles(),
carapace.ActionFiles(),
)
}

View File

@ -0,0 +1,25 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var securefile_downloadCmd = &cobra.Command{
Use: "download <fileID> [flags]",
Short: "Download a secure file for a project.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(securefile_downloadCmd).Standalone()
securefile_downloadCmd.Flags().StringP("path", "p", "", "Path to download the secure file to, including filename and extension.")
securefileCmd.AddCommand(securefile_downloadCmd)
carapace.Gen(securefile_downloadCmd).FlagCompletion(carapace.ActionMap{
"path": carapace.ActionFiles(),
})
// TODO complete file ids
}

View File

@ -0,0 +1,21 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var securefile_listCmd = &cobra.Command{
Use: "list [flags]",
Short: "List secure files for a project.",
Aliases: []string{"ls"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(securefile_listCmd).Standalone()
securefile_listCmd.Flags().StringP("page", "p", "", "Page number.")
securefile_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
securefileCmd.AddCommand(securefile_listCmd)
}

View File

@ -0,0 +1,22 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var securefile_removeCmd = &cobra.Command{
Use: "remove <fileID>",
Short: "Remove a secure file.",
Aliases: []string{"rm", "delete"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(securefile_removeCmd).Standalone()
securefile_removeCmd.Flags().BoolP("yes", "y", false, "Skip the confirmation prompt.")
securefileCmd.AddCommand(securefile_removeCmd)
// TODO complete file ids
}

View File

@ -2,11 +2,12 @@ package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)
var snippet_createCmd = &cobra.Command{
Use: "create [path]",
Use: "create [flags] -t <title> <file1> [<file2>...]",
Short: "Create a new snippet.",
Aliases: []string{"new"},
Run: func(cmd *cobra.Command, args []string) {},
@ -18,15 +19,15 @@ func init() {
snippet_createCmd.Flags().StringP("description", "d", "", "Description of the snippet.")
snippet_createCmd.Flags().StringP("filename", "f", "", "Filename of the snippet in GitLab.")
snippet_createCmd.Flags().BoolP("personal", "p", false, "Create a personal snippet.")
snippet_createCmd.Flags().StringP("title", "t", "", "Title of the snippet.")
snippet_createCmd.Flags().StringP("title", "t", "", "(required) Title of the snippet.")
snippet_createCmd.Flags().StringP("visibility", "v", "", "Limit by visibility: 'public', 'internal', or 'private'")
snippetCmd.AddCommand(snippet_createCmd)
carapace.Gen(snippet_createCmd).FlagCompletion(carapace.ActionMap{
"visibility": carapace.ActionValues("public", "internal", "private"),
"visibility": carapace.ActionValues("public", "internal", "private").StyleF(style.ForKeyword),
})
carapace.Gen(snippet_createCmd).PositionalCompletion(
carapace.Gen(snippet_createCmd).PositionalAnyCompletion(
carapace.ActionFiles(),
)
}

View File

@ -16,9 +16,14 @@ func init() {
sshKey_addCmd.Flags().StringP("expires-at", "e", "", "The expiration date of the SSH key. Uses ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.")
sshKey_addCmd.Flags().StringP("title", "t", "", "New SSH key's title.")
sshKey_addCmd.Flags().StringP("usage-type", "u", "", "Usage scope for the key. Possible values: 'auth', 'signing' or 'auth_and_signing'. Default value: 'auth_and_signing'.")
sshKey_addCmd.MarkFlagRequired("title")
sshKeyCmd.AddCommand(sshKey_addCmd)
carapace.Gen(sshKey_addCmd).FlagCompletion(carapace.ActionMap{
"usage-type": carapace.ActionValues("auth", "signing", "auth_and_signing"),
})
carapace.Gen(sshKey_addCmd).PositionalCompletion(
carapace.ActionFiles(),
)

View File

@ -0,0 +1,18 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var stack_reorderCmd = &cobra.Command{
Use: "reorder",
Short: "Reorder a stack of merge requests. (EXPERIMENTAL.)",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(stack_reorderCmd).Standalone()
stackCmd.AddCommand(stack_reorderCmd)
}

View File

@ -0,0 +1,20 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var stack_switchCmd = &cobra.Command{
Use: "switch <stack-name>",
Short: "Switch between stacks. (EXPERIMENTAL.)",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(stack_switchCmd).Standalone()
stackCmd.AddCommand(stack_switchCmd)
// TODO complete stack names
}

View File

@ -9,7 +9,7 @@ import (
var tokenCmd = &cobra.Command{
Use: "token",
Short: "Manage personal, project, or group tokens",
Aliases: []string{"tok"},
Aliases: []string{"token"},
Run: func(cmd *cobra.Command, args []string) {},
}

View File

@ -17,7 +17,8 @@ func init() {
carapace.Gen(token_createCmd).Standalone()
token_createCmd.Flags().StringP("access-level", "A", "", "Access level of the token: one of 'guest', 'reporter', 'developer', 'maintainer', 'owner'.")
token_createCmd.Flags().StringP("duration", "D", "", "Sets the token duration, in hours. Maximum of 8760. Examples: 24h, 168h, 504w.")
token_createCmd.Flags().String("description", "", "Sets the token's description.")
token_createCmd.Flags().StringP("duration", "D", "", "Sets the token duration, in hours. Maximum of 8760. Examples: 24h, 168h, 504h.")
token_createCmd.Flags().StringP("expires-at", "E", "", "Sets the token's expiration date and time, in YYYY-MM-DD format. If not specified, --duration is used.")
token_createCmd.Flags().StringP("group", "g", "", "Create a group access token. Ignored if a user or repository argument is set.")
token_createCmd.Flags().StringP("output", "F", "", "Format output as 'text' for the token value, 'json' for the actual API token structure.")

View File

@ -0,0 +1,33 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var token_listCmd = &cobra.Command{
Use: "list",
Short: "List user, group, or project access tokens.",
Aliases: []string{"ls"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(token_listCmd).Standalone()
token_listCmd.Flags().BoolP("active", "a", false, "List only the active tokens.")
token_listCmd.Flags().StringP("group", "g", "", "List group access tokens. Ignored if a user or repository argument is set.")
token_listCmd.Flags().StringP("output", "F", "", "Format output as: text, json. text provides a readable table, json outputs the tokens with metadata.")
token_listCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
token_listCmd.Flags().StringP("user", "U", "", "List personal access tokens. Use @me for the current user.")
tokenCmd.AddCommand(token_listCmd)
// TODO complete group
carapace.Gen(token_listCmd).FlagCompletion(carapace.ActionMap{
"group": action.ActionGroups(token_listCmd),
"output": carapace.ActionValues("text", "json"),
"repo": action.ActionRepo(token_listCmd),
"user": action.ActionUsers(token_listCmd),
})
}

View File

@ -0,0 +1,32 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var token_revokeCmd = &cobra.Command{
Use: "revoke <token-name|token-id>",
Short: "Revoke user, group or project access tokens",
Aliases: []string{"revoke", "rm"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(token_revokeCmd).Standalone()
token_revokeCmd.Flags().StringP("group", "g", "", "Revoke group access token. Ignored if a user or repository argument is set.")
token_revokeCmd.Flags().StringP("output", "F", "", "Format output as: text, json. 'text' provides the name and ID of the revoked token; 'json' outputs the token with metadata.")
token_revokeCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
token_revokeCmd.Flags().StringP("user", "U", "", "Revoke personal access token. Use @me for the current user.")
tokenCmd.AddCommand(token_revokeCmd)
carapace.Gen(token_revokeCmd).FlagCompletion(carapace.ActionMap{
"group": action.ActionGroups(token_revokeCmd),
"repo": action.ActionRepo(token_revokeCmd),
"user": action.ActionUsers(token_revokeCmd),
})
// TODO complete tokens
}

View File

@ -0,0 +1,35 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/glab_completer/cmd/action"
"github.com/spf13/cobra"
)
var token_rotateCmd = &cobra.Command{
Use: "rotate <token-name|token-id>",
Short: "Rotate user, group, or project access tokens",
Aliases: []string{"rotate", "rot"},
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(token_rotateCmd).Standalone()
token_rotateCmd.Flags().StringP("duration", "D", "", "Sets the token duration, in hours. Maximum of 8760. Examples: 24h, 168h, 504h.")
token_rotateCmd.Flags().StringP("expires-at", "E", "", "Sets the token's expiration date and time, in YYYY-MM-DD format. If not specified, --duration is used.")
token_rotateCmd.Flags().StringP("group", "g", "", "Rotate group access token. Ignored if a user or repository argument is set.")
token_rotateCmd.Flags().StringP("output", "F", "", "Format output as: text, json. 'text' provides the new token value; 'json' outputs the token with metadata.")
token_rotateCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
token_rotateCmd.Flags().StringP("user", "U", "", "Rotate personal access token. Use @me for the current user.")
tokenCmd.AddCommand(token_rotateCmd)
carapace.Gen(token_rotateCmd).FlagCompletion(carapace.ActionMap{
"group": action.ActionGroups(token_rotateCmd),
"output": carapace.ActionValues("text", "json"),
"repo": action.ActionRepo(token_rotateCmd),
"user": action.ActionUsers(token_rotateCmd),
})
// TODO complete tokens
}

View File

@ -16,14 +16,18 @@ var variable_exportCmd = &cobra.Command{
func init() {
carapace.Gen(variable_exportCmd).Standalone()
variable_exportCmd.Flags().StringP("format", "F", "", "Format of output: json, export, env.")
variable_exportCmd.PersistentFlags().StringP("group", "g", "", "Select a group or subgroup. Ignored if a repository argument is set.")
variable_exportCmd.Flags().StringP("page", "p", "", "Page number.")
variable_exportCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
variable_exportCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
variable_exportCmd.Flags().StringP("scope", "s", "", "The environment_scope of the variables. Values: '*' (default), or specific environments.")
variableCmd.AddCommand(variable_exportCmd)
// TODO complete scope
carapace.Gen(variable_exportCmd).FlagCompletion(carapace.ActionMap{
"group": action.ActionGroups(variable_exportCmd),
"repo": action.ActionRepo(variable_exportCmd),
"format": carapace.ActionValues("json", "export", "env"),
"group": action.ActionGroups(variable_exportCmd),
"repo": action.ActionRepo(variable_exportCmd),
})
}

View File

@ -18,6 +18,8 @@ func init() {
variable_listCmd.PersistentFlags().StringP("group", "g", "", "Select a group or subgroup. Ignored if a repository argument is set.")
variable_listCmd.Flags().StringP("output", "F", "", "Format output as: text, json.")
variable_listCmd.Flags().StringP("page", "p", "", "Page number.")
variable_listCmd.Flags().StringP("per-page", "P", "", "Number of items to list per page.")
variable_listCmd.PersistentFlags().StringP("repo", "R", "", "Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.")
variableCmd.AddCommand(variable_listCmd)

View File

@ -16,6 +16,7 @@ var variable_setCmd = &cobra.Command{
func init() {
carapace.Gen(variable_setCmd).Standalone()
variable_setCmd.Flags().StringP("description", "d", "", "Set description of a variable.")
variable_setCmd.Flags().StringP("group", "g", "", "Set variable for a group.")
variable_setCmd.Flags().BoolP("masked", "m", false, "Whether the variable is masked.")
variable_setCmd.Flags().BoolP("protected", "p", false, "Whether the variable is protected.")

View File

@ -15,6 +15,7 @@ var variable_updateCmd = &cobra.Command{
func init() {
carapace.Gen(variable_updateCmd).Standalone()
variable_updateCmd.Flags().StringP("description", "d", "", "Set description of a variable.")
variable_updateCmd.Flags().StringP("group", "g", "", "Set variable for a group.")
variable_updateCmd.Flags().BoolP("masked", "m", false, "Whether the variable is masked.")
variable_updateCmd.Flags().BoolP("protected", "p", false, "Whether the variable is protected.")