Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh: updates from v2.59.0 #2553

Merged
merged 1 commit into from
Oct 16, 2024
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
2 changes: 2 additions & 0 deletions completers/gh_completer/cmd/gist_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ var gist_listCmd = &cobra.Command{
func init() {
carapace.Gen(gist_listCmd).Standalone()

gist_listCmd.Flags().String("filter", "", "Filter gists using a regular `expression`")
gist_listCmd.Flags().Bool("include-content", false, "Include gists' file content when filtering")
gist_listCmd.Flags().StringP("limit", "L", "", "Maximum number of gists to fetch")
gist_listCmd.Flags().Bool("public", false, "Show only public gists")
gist_listCmd.Flags().Bool("secret", false, "Show only secret gists")
Expand Down
19 changes: 19 additions & 0 deletions completers/gh_completer/cmd/repo_gitignore.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var repo_gitignoreCmd = &cobra.Command{
Use: "gitignore <command>",
Short: "List and view available repository gitignore templates",
GroupID: "Targeted commands",
Run: func(cmd *cobra.Command, args []string) {},
}

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

repoCmd.AddCommand(repo_gitignoreCmd)
}
19 changes: 19 additions & 0 deletions completers/gh_completer/cmd/repo_gitignore_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var repo_gitignore_listCmd = &cobra.Command{
Use: "list",
Short: "List available repository gitignore templates",
Aliases: []string{"ls"},
Run: func(cmd *cobra.Command, args []string) {},
}

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

repo_gitignoreCmd.AddCommand(repo_gitignore_listCmd)
}
23 changes: 23 additions & 0 deletions completers/gh_completer/cmd/repo_gitignore_view.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/completers/gh_completer/cmd/action"
"github.com/spf13/cobra"
)

var repo_gitignore_viewCmd = &cobra.Command{
Use: "view <template>",
Short: "View an available repository gitignore template",
Run: func(cmd *cobra.Command, args []string) {},
}

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

repo_gitignoreCmd.AddCommand(repo_gitignore_viewCmd)

carapace.Gen(repo_gitignore_viewCmd).PositionalCompletion(
action.ActionGitignoreTemplates(repo_gitignore_viewCmd),
)
}
19 changes: 19 additions & 0 deletions completers/gh_completer/cmd/repo_license.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var repo_licenseCmd = &cobra.Command{
Use: "license <command>",
Short: "Explore repository licenses",
GroupID: "Targeted commands",
Run: func(cmd *cobra.Command, args []string) {},
}

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

repoCmd.AddCommand(repo_licenseCmd)
}
19 changes: 19 additions & 0 deletions completers/gh_completer/cmd/repo_license_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var repo_license_listCmd = &cobra.Command{
Use: "list",
Short: "List common repository licenses",
Aliases: []string{"ls"},
Run: func(cmd *cobra.Command, args []string) {},
}

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

repo_licenseCmd.AddCommand(repo_license_listCmd)
}
24 changes: 24 additions & 0 deletions completers/gh_completer/cmd/repo_license_view.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/gh"
"github.com/spf13/cobra"
)

var repo_license_viewCmd = &cobra.Command{
Use: "view {<license-key> | <SPDX-ID>}",
Short: "View a specific repository license",
Run: func(cmd *cobra.Command, args []string) {},
}

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

repo_license_viewCmd.Flags().BoolP("web", "w", false, "Open https://choosealicense.com/ in the browser")
repo_licenseCmd.AddCommand(repo_license_viewCmd)

carapace.Gen(repo_license_viewCmd).PositionalCompletion(
gh.ActionLicenses(gh.HostOpts{}),
)
}