Skip to content

Commit

Permalink
gh: updates from v2.59.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 16, 2024
1 parent 0f40dfe commit 5b0cbd7
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 0 deletions.
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{}),
)
}

0 comments on commit 5b0cbd7

Please sign in to comment.