Skip to content

Commit

Permalink
gh: updates from v2.44.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Feb 15, 2024
1 parent 2cb096a commit b77597a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions completers/gh_completer/cmd/cache_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func init() {

cache_listCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
cache_listCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
cache_listCmd.Flags().StringP("key", "k", "", "Filter by cache key prefix")
cache_listCmd.Flags().StringP("limit", "L", "", "Maximum number of caches to fetch")
cache_listCmd.Flags().StringP("order", "O", "", "Order of caches returned: {asc|desc}")
cache_listCmd.Flags().StringP("sort", "S", "", "Sort fetched caches: {created_at|last_accessed_at|size_in_bytes}")
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/gist_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func init() {

gist_createCmd.Flags().StringP("desc", "d", "", "A description for this gist")
gist_createCmd.Flags().StringP("filename", "f", "", "Provide a filename to be used when reading from standard input")
gist_createCmd.Flags().BoolP("public", "p", false, "List the gist publicly (default: secret)")
gist_createCmd.Flags().BoolP("public", "p", false, "List the gist publicly (default \"secret\")")
gist_createCmd.Flags().BoolP("web", "w", false, "Open the web browser with created gist")
gistCmd.AddCommand(gist_createCmd)

Expand Down
6 changes: 5 additions & 1 deletion completers/gh_completer/cmd/pr_checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ var pr_checkoutCmd = &cobra.Command{
func init() {
carapace.Gen(pr_checkoutCmd).Standalone()

pr_checkoutCmd.Flags().StringP("branch", "b", "", "Local branch name to use (default: the name of the head branch)")
pr_checkoutCmd.Flags().StringP("branch", "b", "", "Local branch name to use (default [the name of the head branch])")
pr_checkoutCmd.Flags().Bool("detach", false, "Checkout PR with a detached HEAD")
pr_checkoutCmd.Flags().BoolP("force", "f", false, "Reset the existing local branch to the latest state of the pull request")
pr_checkoutCmd.Flags().Bool("recurse-submodules", false, "Update all submodules after checkout")
prCmd.AddCommand(pr_checkoutCmd)

carapace.Gen(pr_checkoutCmd).FlagCompletion(carapace.ActionMap{
"branch": action.ActionBranches(pr_checkoutCmd),
})

carapace.Gen(pr_checkoutCmd).PositionalCompletion(
action.ActionPullRequests(pr_checkoutCmd, action.PullRequestOpts{Open: true}),
)
Expand Down
3 changes: 2 additions & 1 deletion completers/gh_completer/cmd/pr_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ func init() {
pr_createCmd.Flags().BoolP("draft", "d", false, "Mark pull request as a draft")
pr_createCmd.Flags().BoolP("fill", "f", false, "Use commit info for title and body")
pr_createCmd.Flags().Bool("fill-first", false, "Use first commit info for title and body")
pr_createCmd.Flags().StringP("head", "H", "", "The `branch` that contains commits for your pull request (default: current branch)")
pr_createCmd.Flags().Bool("fill-verbose", false, "Use commits msg+body for description")
pr_createCmd.Flags().StringP("head", "H", "", "The `branch` that contains commits for your pull request (default [current branch])")
pr_createCmd.Flags().StringSliceP("label", "l", []string{}, "Add labels by `name`")
pr_createCmd.Flags().StringP("milestone", "m", "", "Add the pull request to a milestone by `name`")
pr_createCmd.Flags().Bool("no-maintainer-edit", false, "Disable maintainer's ability to modify pull request")
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/release_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ func init() {
release_createCmd.Flags().String("discussion-category", "", "Start a discussion in the specified category")
release_createCmd.Flags().BoolP("draft", "d", false, "Save the release as a draft instead of publishing it")
release_createCmd.Flags().Bool("generate-notes", false, "Automatically generate title and notes for the release")
release_createCmd.Flags().Bool("latest", false, "Mark this release as \"Latest\" (default: automatic based on date and version)")
release_createCmd.Flags().Bool("latest", false, "Mark this release as \"Latest\" (default [automatic based on date and version])")
release_createCmd.Flags().StringP("notes", "n", "", "Release notes")
release_createCmd.Flags().StringP("notes-file", "F", "", "Read release notes from `file` (use \"-\" to read from standard input)")
release_createCmd.Flags().Bool("notes-from-tag", false, "Automatically generate notes from annotated tag")
release_createCmd.Flags().String("notes-start-tag", "", "Tag to use as the starting point for generating release notes")
release_createCmd.Flags().BoolP("prerelease", "p", false, "Mark the release as a prerelease")
release_createCmd.Flags().String("target", "", "Target `branch` or full commit SHA (default: main branch)")
release_createCmd.Flags().String("target", "", "Target `branch` or full commit SHA (default [main branch])")
release_createCmd.Flags().StringP("title", "t", "", "Release title")
release_createCmd.Flags().Bool("verify-tag", false, "Abort in case the git tag doesn't already exist in the remote repository")
releaseCmd.AddCommand(release_createCmd)
Expand Down
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/release_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {
release_editCmd.Flags().StringP("notes-file", "F", "", "Read release notes from `file` (use \"-\" to read from standard input)")
release_editCmd.Flags().Bool("prerelease", false, "Mark the release as a prerelease")
release_editCmd.Flags().String("tag", "", "The name of the tag")
release_editCmd.Flags().String("target", "", "Target `branch` or full commit SHA (default: main branch)")
release_editCmd.Flags().String("target", "", "Target `branch` or full commit SHA (default [main branch])")
release_editCmd.Flags().StringP("title", "t", "", "Release title")
release_editCmd.Flags().Bool("verify-tag", false, "Abort in case the git tag doesn't already exist in the remote repository")
releaseCmd.AddCommand(release_editCmd)
Expand Down
5 changes: 4 additions & 1 deletion completers/gh_completer/cmd/release_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/tools/gh"
"github.com/rsteube/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -22,10 +23,12 @@ func init() {
release_listCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
release_listCmd.Flags().StringSlice("json", []string{}, "Output JSON with the specified `fields`")
release_listCmd.Flags().StringP("limit", "L", "", "Maximum number of items to fetch")
release_listCmd.Flags().StringP("order", "O", "", "Order of releases returned: {asc|desc}")
release_listCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
releaseCmd.AddCommand(release_listCmd)

carapace.Gen(release_listCmd).FlagCompletion(carapace.ActionMap{
"json": gh.ActionReleaseFields().UniqueList(","),
"json": gh.ActionReleaseFields().UniqueList(","),
"order": carapace.ActionValues("asc", "desc").StyleF(style.ForKeyword),
})
}
2 changes: 1 addition & 1 deletion completers/gh_completer/cmd/repo_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var repo_syncCmd = &cobra.Command{
func init() {
carapace.Gen(repo_syncCmd).Standalone()

repo_syncCmd.Flags().StringP("branch", "b", "", "Branch to sync (default: default branch)")
repo_syncCmd.Flags().StringP("branch", "b", "", "Branch to sync (default [default branch])")
repo_syncCmd.Flags().Bool("force", false, "Hard reset the branch of the destination repository to match the source repository")
repo_syncCmd.Flags().StringP("source", "s", "", "Source repository")
repoCmd.AddCommand(repo_syncCmd)
Expand Down

0 comments on commit b77597a

Please sign in to comment.