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

feat: set annotations to generate additional bash completion information #2221

Merged
merged 1 commit into from Sep 5, 2022

Conversation

dirien
Copy link
Contributor

@dirien dirien commented Sep 4, 2022

Signed-off-by: Engin Diri engin.diri@mail.schwarz

FYI: @developer-guy and @fedeci

Summary

This PR is related to #2186 and set arbitrary annotations on a flag in the FlagSet. This is used by spf13/cobra programs which want to generate additional bash completion information and in this case for the Fig autocomplete spec.

This will add the template: ["filepaths",] to the flag

...
 {
        name: ["--key",],
        description: "path to the public key file, KMS URI or Kubernetes Secret",
        args: [{name: "key", template: ["filepaths",],},],
 }
...

After this PR, we can finally start to create the GitHub Action to autogenerate and push to the Fig repository.

Release Note

NONE

Documentation

NONE

Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2022

Codecov Report

Merging #2221 (eb5c246) into main (1ca09f2) will increase coverage by 0.01%.
The diff coverage is 21.95%.

@@            Coverage Diff             @@
##             main    #2221      +/-   ##
==========================================
+ Coverage   26.51%   26.52%   +0.01%     
==========================================
  Files         131      131              
  Lines        7671     7709      +38     
==========================================
+ Hits         2034     2045      +11     
- Misses       5376     5405      +29     
+ Partials      261      259       -2     
Impacted Files Coverage Δ
cmd/cosign/cli/options/attach.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/attest.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/certificate.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/files.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/import_key_pair.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/initialize.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/load.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/oidc.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/pkcs11_tool.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/policy.go 0.00% <0.00%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dlorenc dlorenc merged commit 04f509c into sigstore:main Sep 5, 2022
@github-actions github-actions bot added this to the v1.12.0 milestone Sep 5, 2022
@dirien dirien deleted the annotations branch September 5, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants