Skip to content

Commit

Permalink
Merge pull request #1458 from rsteube/gh-updates-v2.21.0
Browse files Browse the repository at this point in the history
gh: updates from v2.21.0
  • Loading branch information
rsteube authored Dec 23, 2022
2 parents f85ebab + 43e103e commit e6e0058
Show file tree
Hide file tree
Showing 145 changed files with 506 additions and 151 deletions.
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ var aliasCmd = &cobra.Command{

func init() {
carapace.Gen(aliasCmd).Standalone()

rootCmd.AddCommand(aliasCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/alias_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var alias_deleteCmd = &cobra.Command{

func init() {
carapace.Gen(alias_deleteCmd).Standalone()

aliasCmd.AddCommand(alias_deleteCmd)

carapace.Gen(alias_deleteCmd).PositionalCompletion(
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/alias_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ var alias_listCmd = &cobra.Command{

func init() {
carapace.Gen(alias_listCmd).Standalone()

aliasCmd.AddCommand(alias_listCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/alias_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var alias_setCmd = &cobra.Command{

func init() {
carapace.Gen(alias_setCmd).Standalone()

alias_setCmd.Flags().BoolP("shell", "s", false, "Declare an alias to be passed through a shell interpreter")
aliasCmd.AddCommand(alias_setCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var apiCmd = &cobra.Command{

func init() {
carapace.Gen(apiCmd).Standalone()

apiCmd.Flags().Duration("cache", 0, "Cache the response, e.g. \"3600s\", \"60m\", \"1h\"")
apiCmd.Flags().StringArrayP("field", "F", []string{}, "Add a typed parameter in `key=value` format")
apiCmd.Flags().StringArrayP("header", "H", []string{}, "Add a HTTP request header in `key:value` format")
Expand Down
8 changes: 5 additions & 3 deletions completers/gh_completer/cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import (
)

var authCmd = &cobra.Command{
Use: "auth <command>",
Short: "Authenticate gh and git with GitHub",
Run: func(cmd *cobra.Command, args []string) {},
Use: "auth <command>",
Short: "Authenticate gh and git with GitHub",
GroupID: "core",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(authCmd).Standalone()

rootCmd.AddCommand(authCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_loginCmd = &cobra.Command{

func init() {
carapace.Gen(auth_loginCmd).Standalone()

auth_loginCmd.Flags().StringP("git-protocol", "p", "", "The protocol to use for git operations: {ssh|https}")
auth_loginCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitHub instance to authenticate with")
auth_loginCmd.Flags().StringSliceP("scopes", "s", []string{}, "Additional authentication scopes to request")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_logoutCmd = &cobra.Command{

func init() {
carapace.Gen(auth_logoutCmd).Standalone()

auth_logoutCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitHub instance to log out of")
authCmd.AddCommand(auth_logoutCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_refreshCmd = &cobra.Command{

func init() {
carapace.Gen(auth_refreshCmd).Standalone()

auth_refreshCmd.Flags().StringP("hostname", "h", "", "The GitHub host to use for authentication")
auth_refreshCmd.Flags().StringSliceP("scopes", "s", []string{}, "Additional authentication scopes for gh to have")
authCmd.AddCommand(auth_refreshCmd)
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_setupGit.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_setupGitCmd = &cobra.Command{

func init() {
carapace.Gen(auth_setupGitCmd).Standalone()

auth_setupGitCmd.Flags().StringP("hostname", "h", "", "The hostname to configure git for")
authCmd.AddCommand(auth_setupGitCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_statusCmd = &cobra.Command{

func init() {
carapace.Gen(auth_statusCmd).Standalone()

auth_statusCmd.Flags().StringP("hostname", "h", "", "Check a specific hostname's auth status")
auth_statusCmd.Flags().BoolP("show-token", "t", false, "Display the auth token")
authCmd.AddCommand(auth_statusCmd)
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/auth_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var auth_tokenCmd = &cobra.Command{

func init() {
carapace.Gen(auth_tokenCmd).Standalone()

auth_tokenCmd.Flags().StringP("hostname", "h", "", "The hostname of the GitHub instance authenticated with")
authCmd.AddCommand(auth_tokenCmd)

Expand Down
8 changes: 5 additions & 3 deletions completers/gh_completer/cmd/browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ import (
)

var browseCmd = &cobra.Command{
Use: "browse [<number> | <path>]",
Short: "Open the repository in the browser",
Run: func(cmd *cobra.Command, args []string) {},
Use: "browse [<number> | <path>]",
Short: "Open the repository in the browser",
GroupID: "core",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(browseCmd).Standalone()

browseCmd.Flags().StringP("branch", "b", "", "Select another branch by passing in the branch name")
browseCmd.Flags().BoolP("commit", "c", false, "Open the last commit")
browseCmd.Flags().BoolP("no-browser", "n", false, "Print destination URL instead of opening the browser")
Expand Down
2 changes: 2 additions & 0 deletions completers/gh_completer/cmd/codespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import (
var codespaceCmd = &cobra.Command{
Use: "codespace",
Short: "Connect to and manage codespaces",
GroupID: "core",
Aliases: []string{"cs"},
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(codespaceCmd).Standalone()

rootCmd.AddCommand(codespaceCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_codeCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_codeCmd).Standalone()

codespace_codeCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_codeCmd.Flags().Bool("insiders", false, "Use the insiders version of Visual Studio Code")
codespace_codeCmd.Flags().BoolP("web", "w", false, "Use the web version of Visual Studio Code")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var codespace_cpCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_cpCmd).Standalone()

codespace_cpCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_cpCmd.Flags().BoolP("expand", "e", false, "Expand remote file names on remote shell")
codespace_cpCmd.Flags().StringP("profile", "p", "", "Name of the SSH profile to use")
Expand Down
5 changes: 4 additions & 1 deletion completers/gh_completer/cmd/codespace_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ var codespace_createCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_createCmd).Standalone()

codespace_createCmd.Flags().StringP("branch", "b", "", "repository branch")
codespace_createCmd.Flags().Bool("default-permissions", false, "do not prompt to accept additional permissions requested by the codespace")
codespace_createCmd.Flags().String("devcontainer-path", "", "path to the devcontainer.json file to use when creating codespace")
codespace_createCmd.Flags().StringP("display-name", "d", "", "display name for the codespace")
codespace_createCmd.Flags().Duration("idle-timeout", 0, "allowed inactivity before codespace is stopped, e.g. \"10m\", \"1h\"")
codespace_createCmd.Flags().StringP("location", "l", "", "location: {EastUs|SouthEastAsia|WestEurope|WestUs2} (determined automatically if not provided)")
codespace_createCmd.Flags().StringP("machine", "m", "", "hardware specifications for the VM")
codespace_createCmd.Flags().StringP("repo", "r", "", "repository name with owner: user/repo")
codespace_createCmd.Flags().StringP("repo", "R", "", "repository name with owner: user/repo")
codespace_createCmd.Flags().StringP("repo-deprecated", "r", "", "(Deprecated) Shorthand for --repo")
codespace_createCmd.Flags().Duration("retention-period", 0, "allowed time after shutting down before the codespace is automatically deleted (maximum 30 days), e.g. \"1h\", \"72h\"")
codespace_createCmd.Flags().BoolP("status", "s", false, "show status of post-create command and dotfiles")
codespaceCmd.AddCommand(codespace_createCmd)
Expand Down
4 changes: 3 additions & 1 deletion completers/gh_completer/cmd/codespace_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ var codespace_deleteCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_deleteCmd).Standalone()

codespace_deleteCmd.Flags().Bool("all", false, "Delete all codespaces")
codespace_deleteCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_deleteCmd.Flags().Uint16("days", 0, "Delete codespaces older than `N` days")
codespace_deleteCmd.Flags().BoolP("force", "f", false, "Skip confirmation for codespaces that contain unsaved changes")
codespace_deleteCmd.Flags().StringP("org", "o", "", "The `login` handle of the organization (admin-only)")
codespace_deleteCmd.Flags().StringP("repo", "r", "", "Delete codespaces for a `repository`")
codespace_deleteCmd.Flags().StringP("repo", "R", "", "Delete codespaces for a `repository`")
codespace_deleteCmd.Flags().StringP("repo-deprecated", "r", "", "(Deprecated) Shorthand for --repo")
codespace_deleteCmd.Flags().StringP("user", "u", "", "The `username` to delete codespaces for (used with --org)")
codespaceCmd.AddCommand(codespace_deleteCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_editCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_editCmd).Standalone()

codespace_editCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_editCmd.Flags().StringP("display-name", "d", "", "Set the display name")
codespace_editCmd.Flags().StringP("machine", "m", "", "Set hardware specifications for the VM")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_jupyter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_jupyterCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_jupyterCmd).Standalone()

codespace_jupyterCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespaceCmd.AddCommand(codespace_jupyterCmd)

Expand Down
4 changes: 3 additions & 1 deletion completers/gh_completer/cmd/codespace_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ var codespace_listCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_listCmd).Standalone()

codespace_listCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
codespace_listCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
codespace_listCmd.Flags().IntP("limit", "L", 30, "Maximum number of codespaces to list")
codespace_listCmd.Flags().StringP("org", "o", "", "The `login` handle of the organization to list codespaces for (admin-only)")
codespace_listCmd.Flags().StringP("repo", "r", "", "Repository name with owner: user/repo")
codespace_listCmd.Flags().StringP("repo", "R", "", "Repository name with owner: user/repo")
codespace_listCmd.Flags().StringP("repo-deprecated", "r", "", "(Deprecated) Shorthand for --repo")
codespace_listCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
codespace_listCmd.Flags().StringP("user", "u", "", "The `username` to list codespaces for (used with --org)")
codespaceCmd.AddCommand(codespace_listCmd)
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_logsCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_logsCmd).Standalone()

codespace_logsCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_logsCmd.Flags().BoolP("follow", "f", false, "Tail and follow the logs")
codespaceCmd.AddCommand(codespace_logsCmd)
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_portsCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_portsCmd).Standalone()

codespace_portsCmd.PersistentFlags().StringP("codespace", "c", "", "Name of the codespace")
codespace_portsCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
codespace_portsCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_ports_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var codespace_ports_forwardCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_ports_forwardCmd).Standalone()

codespace_portsCmd.AddCommand(codespace_ports_forwardCmd)

carapace.Gen(codespace_ports_forwardCmd).PositionalCompletion(
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_ports_visibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_ports_visibilityCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_ports_visibilityCmd).Standalone()

codespace_portsCmd.AddCommand(codespace_ports_visibilityCmd)

carapace.Gen(codespace_ports_visibilityCmd).PositionalAnyCompletion(
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_rebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_rebuildCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_rebuildCmd).Standalone()

codespace_rebuildCmd.Flags().StringP("codespace", "c", "", "name of the codespace")
codespace_rebuildCmd.Flags().Bool("full", false, "perform a full rebuild")
codespaceCmd.AddCommand(codespace_rebuildCmd)
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var codespace_sshCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_sshCmd).Standalone()

codespace_sshCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_sshCmd.Flags().Bool("config", false, "Write OpenSSH configuration to stdout")
codespace_sshCmd.Flags().BoolP("debug", "d", false, "Log debug data to a file")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/codespace_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var codespace_stopCmd = &cobra.Command{

func init() {
carapace.Gen(codespace_stopCmd).Standalone()

codespace_stopCmd.Flags().StringP("codespace", "c", "", "Name of the codespace")
codespace_stopCmd.Flags().StringP("org", "o", "", "The `login` handle of the organization (admin-only)")
codespace_stopCmd.Flags().StringP("user", "u", "", "The `username` to stop codespace for (used with --org)")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var completionCmd = &cobra.Command{

func init() {
carapace.Gen(completionCmd).Standalone()

completionCmd.Flags().StringP("shell", "s", "", "Shell type: {bash|zsh|fish|powershell}")
rootCmd.AddCommand(completionCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ var configCmd = &cobra.Command{

func init() {
carapace.Gen(configCmd).Standalone()

rootCmd.AddCommand(configCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/config_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var config_getCmd = &cobra.Command{

func init() {
carapace.Gen(config_getCmd).Standalone()

config_getCmd.Flags().StringP("host", "h", "", "Get per-host setting")
configCmd.AddCommand(config_getCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/config_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var config_listCmd = &cobra.Command{

func init() {
carapace.Gen(config_listCmd).Standalone()

config_listCmd.Flags().StringP("host", "h", "", "Get per-host configuration")
configCmd.AddCommand(config_listCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/config_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var config_setCmd = &cobra.Command{

func init() {
carapace.Gen(config_setCmd).Standalone()

config_setCmd.Flags().StringP("host", "h", "", "Set per-host setting")
configCmd.AddCommand(config_setCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ var extensionCmd = &cobra.Command{

func init() {
carapace.Gen(extensionCmd).Standalone()

rootCmd.AddCommand(extensionCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var extension_browseCmd = &cobra.Command{

func init() {
carapace.Gen(extension_browseCmd).Standalone()

extension_browseCmd.Flags().Bool("debug", false, "log to /tmp/extBrowse-*")
extensionCmd.AddCommand(extension_browseCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var extension_createCmd = &cobra.Command{

func init() {
carapace.Gen(extension_createCmd).Standalone()

extension_createCmd.Flags().String("precompiled", "", "Create a precompiled extension. Possible values: go, other")
extensionCmd.AddCommand(extension_createCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var extension_execCmd = &cobra.Command{

func init() {
carapace.Gen(extension_execCmd).Standalone()

extensionCmd.AddCommand(extension_execCmd)

carapace.Gen(extension_execCmd).PositionalCompletion(
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var extension_installCmd = &cobra.Command{

func init() {
carapace.Gen(extension_installCmd).Standalone()

extension_installCmd.Flags().String("pin", "", "pin extension to a release tag or commit ref")
extensionCmd.AddCommand(extension_installCmd)

Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ var extension_listCmd = &cobra.Command{

func init() {
carapace.Gen(extension_listCmd).Standalone()

extensionCmd.AddCommand(extension_listCmd)
}
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var extension_removeCmd = &cobra.Command{

func init() {
carapace.Gen(extension_removeCmd).Standalone()

extensionCmd.AddCommand(extension_removeCmd)

carapace.Gen(extension_removeCmd).PositionalCompletion(
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ var extension_searchCmd = &cobra.Command{

func init() {
carapace.Gen(extension_searchCmd).Standalone()

extension_searchCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
extension_searchCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
extension_searchCmd.Flags().StringSlice("license", []string{}, "Filter based on license type")
Expand Down
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/extension_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var extension_upgradeCmd = &cobra.Command{

func init() {
carapace.Gen(extension_upgradeCmd).Standalone()

extension_upgradeCmd.Flags().Bool("all", false, "Upgrade all extensions")
extension_upgradeCmd.Flags().Bool("dry-run", false, "Only display upgrades")
extension_upgradeCmd.Flags().Bool("force", false, "Force upgrade extension")
Expand Down
Loading

0 comments on commit e6e0058

Please sign in to comment.