-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: add cosign
autocompletion
#873
Conversation
Overviewsrc/cosign.ts:Info:URLs:
|
Hello @developer-guy,
Please add a 👍 as a reaction to this comment to show that you read this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked too closely at this but overall it looks good. One thing to be aware of is that since cosign
is implemented using cobra
, it should be possible to autogenerate a completion spec.
Check out this guide for more details.
Yep, I've already opened a PR to cosign side 👇 |
kindly ping 🙋🏻♂️ |
I imagine this has been generated by adding the cobra integration locally, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure this has been generated via the cobra integration. There are a lot of lines here and it would be quite long to review all the possible templates/suggestions for the args both for us and for you.
What we could do to add useful props quickly is to perform a strategic search of some keywords in the spec.
e.g.:
- options that has output,input,path in the name will likely accept filepaths
/\([a-zA-Z0-9]+\|/g
this regex will instead highlight all options that require a suggestions field)
name: "--output-file", | ||
description: "Log output to a file", | ||
displayName: "output-file", | ||
args: { name: "output-file" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This accepts a filepaths template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure this has been generated via the cobra integration. There are a lot of lines here and it would be quite long to review all the possible templates/suggestions for the args both for us and for you. What we could do to add useful props quickly is to perform a strategic search of some keywords in the spec. e.g.:
- options that has output,input,path in the name will likely accept filepaths
/\([a-zA-Z0-9]+\|/g
this regex will instead highlight all options that require a suggestions field)
/cc @developer-guy this can be done in another PR
}, | ||
{ | ||
name: "--type", | ||
description: "Type of sbom (spdx|cyclonedx|syft)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These suggestions can be mentioned in the suggestions
prop of arg.
Signed-off-by: Batuhan Apaydın <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
thanks for merging @fedeci |
Signed-off-by: Batuhan Apaydın [email protected]
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feature
What is the current behavior? (You can also link to an open issue here)
no support for cosign
What is the new behavior (if this is a feature change)?
will add cosign CLI autocompletion support
Additional info:
https://github.com/sigstore/cosign
sigstore/cosign#1360