Skip to content

Commit

Permalink
Merge pull request #2531 from carapace-sh/gh-updates-v2.57.0
Browse files Browse the repository at this point in the history
gh: updates from v2.57.0
  • Loading branch information
rsteube authored Sep 18, 2024
2 parents 818f9ce + 18728f5 commit f59149a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions completers/gh_completer/cmd/attestation_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func init() {
carapace.Gen(attestation_downloadCmd).Standalone()

attestation_downloadCmd.Flags().StringP("digest-alg", "d", "", "The algorithm used to compute a digest of the artifact: {sha256|sha512}")
attestation_downloadCmd.Flags().String("hostname", "", "Configure host to use")
attestation_downloadCmd.Flags().StringP("limit", "L", "", "Maximum number of attestations to fetch")
attestation_downloadCmd.Flags().StringP("owner", "o", "", "a GitHub organization to scope attestation lookup by")
attestation_downloadCmd.Flags().String("predicate-type", "", "Filter attestations by provided predicate type")
Expand All @@ -24,6 +25,7 @@ func init() {

carapace.Gen(attestation_downloadCmd).FlagCompletion(carapace.ActionMap{
"digest-alg": carapace.ActionValues("sha256", "sha512"),
"hostname": gh.ActionConfigHosts(),
"owner": gh.ActionOrganizations(gh.HostOpts{}),
"repo": gh.ActionHostOwnerRepositories(),
})
Expand Down
3 changes: 3 additions & 0 deletions completers/gh_completer/cmd/attestation_inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

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

Expand All @@ -18,6 +19,7 @@ func init() {
attestation_inspectCmd.Flags().StringP("bundle", "b", "", "Path to bundle on disk, either a single bundle in a JSON file or a JSON lines file with multiple bundles")
attestation_inspectCmd.Flags().StringP("digest-alg", "d", "", "The algorithm used to compute a digest of the artifact: {sha256|sha512}")
attestation_inspectCmd.Flags().String("format", "", "Output format: {json}")
attestation_inspectCmd.Flags().String("hostname", "", "Configure host to use")
attestation_inspectCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
attestation_inspectCmd.Flags().StringP("template", "t", "", "Format JSON output using a Go template; see \"gh help formatting\"")
attestation_inspectCmd.MarkFlagRequired("bundle")
Expand All @@ -27,6 +29,7 @@ func init() {
"bundle": carapace.ActionFiles(),
"digest-alg": carapace.ActionValues("sha256", "sha512"),
"format": carapace.ActionValues("json"),
"hostname": gh.ActionConfigHosts(),
})

carapace.Gen(attestation_inspectCmd).PositionalCompletion(
Expand Down
3 changes: 3 additions & 0 deletions completers/gh_completer/cmd/attestation_trustedRoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

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

Expand All @@ -14,12 +15,14 @@ var attestation_trustedRootCmd = &cobra.Command{
func init() {
carapace.Gen(attestation_trustedRootCmd).Standalone()

attestation_trustedRootCmd.Flags().String("hostname", "", "Configure host to use")
attestation_trustedRootCmd.Flags().String("tuf-root", "", "Path to the TUF root.json file on disk")
attestation_trustedRootCmd.Flags().String("tuf-url", "", "URL to the TUF repository mirror")
attestation_trustedRootCmd.Flags().Bool("verify-only", false, "Don't output trusted_root.jsonl contents")
attestationCmd.AddCommand(attestation_trustedRootCmd)

carapace.Gen(attestation_trustedRootCmd).FlagCompletion(carapace.ActionMap{
"hostname": gh.ActionConfigHosts(),
"tuf-root": carapace.ActionFiles(),
// TODO tuf-url
})
Expand Down
3 changes: 3 additions & 0 deletions completers/gh_completer/cmd/attestation_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ func init() {
carapace.Gen(attestation_verifyCmd).Standalone()

attestation_verifyCmd.Flags().StringP("bundle", "b", "", "Path to bundle on disk, either a single bundle in a JSON file or a JSON lines file with multiple bundles")
attestation_verifyCmd.Flags().Bool("bundle-from-oci", false, "When verifying an OCI image, fetch the attestation bundle from the OCI registry instead of from GitHub")
attestation_verifyCmd.Flags().String("cert-identity", "", "Enforce that the certificate's subject alternative name matches the provided value exactly")
attestation_verifyCmd.Flags().StringP("cert-identity-regex", "i", "", "Enforce that the certificate's subject alternative name matches the provided regex")
attestation_verifyCmd.Flags().String("cert-oidc-issuer", "", "Issuer of the OIDC token")
attestation_verifyCmd.Flags().String("custom-trusted-root", "", "Path to a trusted_root.jsonl file; likely for offline verification")
attestation_verifyCmd.Flags().Bool("deny-self-hosted-runners", false, "Fail verification for attestations generated on self-hosted runners")
attestation_verifyCmd.Flags().StringP("digest-alg", "d", "", "The algorithm used to compute a digest of the artifact: {sha256|sha512}")
attestation_verifyCmd.Flags().String("format", "", "Output format: {json}")
attestation_verifyCmd.Flags().String("hostname", "", "Configure host to use")
attestation_verifyCmd.Flags().StringP("jq", "q", "", "Filter JSON output using a jq `expression`")
attestation_verifyCmd.Flags().StringP("limit", "L", "", "Maximum number of attestations to fetch")
attestation_verifyCmd.Flags().Bool("no-public-good", false, "Do not verify attestations signed with Sigstore public good instance")
Expand All @@ -42,6 +44,7 @@ func init() {
"custom-trusted-root": carapace.ActionFiles(),
"digest-alg": carapace.ActionValues("sha256", "sha512"),
"format": carapace.ActionValues("json"),
"hostname": gh.ActionConfigHosts(),
"owner": gh.ActionOrganizations(gh.HostOpts{}),
"repo": gh.ActionHostOwnerRepositories(),
"signer-repo": gh.ActionHostOwnerRepositories(),
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 @@ -15,6 +15,7 @@ var auth_statusCmd = &cobra.Command{
func init() {
carapace.Gen(auth_statusCmd).Standalone()

auth_statusCmd.Flags().BoolP("active", "a", false, "Display the active account only")
auth_statusCmd.Flags().StringP("hostname", "h", "", "Check only a specific hostname's auth status")
auth_statusCmd.Flags().BoolP("show-token", "t", false, "Display the auth token")
authCmd.AddCommand(auth_statusCmd)
Expand Down
4 changes: 2 additions & 2 deletions completers/gh_completer/cmd/issue_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ func init() {

issue_editCmd.Flags().StringSlice("add-assignee", []string{}, "Add assigned users by their `login`. Use \"@me\" to assign yourself.")
issue_editCmd.Flags().StringSlice("add-label", []string{}, "Add labels by `name`")
issue_editCmd.Flags().StringSlice("add-project", []string{}, "Add the issue to projects by `name`")
issue_editCmd.Flags().StringSlice("add-project", []string{}, "Add the issue to projects by `title`")
issue_editCmd.Flags().StringP("body", "b", "", "Set the new body.")
issue_editCmd.Flags().StringP("body-file", "F", "", "Read body text from `file` (use \"-\" to read from standard input)")
issue_editCmd.Flags().StringP("milestone", "m", "", "Edit the milestone the issue belongs to by `name`")
issue_editCmd.Flags().StringSlice("remove-assignee", []string{}, "Remove assigned users by their `login`. Use \"@me\" to unassign yourself.")
issue_editCmd.Flags().StringSlice("remove-label", []string{}, "Remove labels by `name`")
issue_editCmd.Flags().Bool("remove-milestone", false, "Remove the milestone association from the issue")
issue_editCmd.Flags().StringSlice("remove-project", []string{}, "Remove the issue from projects by `name`")
issue_editCmd.Flags().StringSlice("remove-project", []string{}, "Remove the issue from projects by `title`")
issue_editCmd.Flags().StringP("title", "t", "", "Set the new title.")
issueCmd.AddCommand(issue_editCmd)

Expand Down

0 comments on commit f59149a

Please sign in to comment.