-
Notifications
You must be signed in to change notification settings - Fork 1.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
✨ Provide a cli option to enable and disable completion command #1776
Conversation
3b99533
to
2222551
Compare
@camilamacedo86 This PR goes in the same direction as #1691 and #1773, moving another command out of the extra commands. I think that the API for frameworks with the new options is clearer, they only have to provide an argument instead of a full COBRA command. WDYT? |
A note in coverage: this PR moves part of the remaining code from |
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.
It is only missing tests.
Otherwise,
/approve
Looking for your tests for we get it merged.
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.
Looking for the small nit fixes for we get it merged.
See the comments
ed1396a
to
9e583cd
Compare
9e583cd
to
2798635
Compare
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.
/lgtm
/approve
Great work 👍
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2798635
to
984fea5
Compare
984fea5
to
85ffa21
Compare
Rebased and added the tests for this option to improve coverage. |
Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
85ffa21
to
15aa5ad
Compare
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.
/lgtm
Description
Provide a
WithCompletion
CLIOption
that enables adds a compeltion generation command instead of having to create it and provide it as an extra command.Changes
cli.New
:WithCompletion
. Creating a command and providing it withWithExtraCommands
should still work with the previous behavior, so this is not a breaking change, but frameworks usingkubebuilder
should migrate to the new approach.