-
Notifications
You must be signed in to change notification settings - Fork 263
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 plugin listing to "kn --help" #929
Conversation
This works on all levels. Test needs to be expanded still. Fixes knative#266
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.
Good start. As you say definitely needs more tests. Don’t forget to add some e2e tests and perhaps verify output with expected that you can have in the e2e test.
Happy to take another pass when tests added.
} | ||
|
||
commandParts := extractPluginCommandFromFileName(name) | ||
if len(commandParts) != len(commandGroupParts)+1 { |
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.
Can we get some English comments for these conditions... typically not for comments but when conditions are not obvious...
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.
Sure.
The following is the coverage report on the affected files.
|
/retest |
@navidshaikh @maximilien tests are green, I also slurped in #910 so that we can get quicker to the release. |
There is probably still someplace for improvement (e.g. how to get to the description of a plugin, for now just the path is printed). But maybe let's leave that for the next release. |
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.
Looks good to me. So let's get this in
/lgtm
➜ client git:(pr/plugin-help) ✗ ./kn -h
kn is the command line interface for managing Knative Serving and Eventing resources
Find more information about Knative at: https://knative.dev
Serving Commands:
service Manage Knative services
revision Manage service revisions
route List and describe service routes
Eventing Commands:
source Manage event sources
broker Manage message broker
trigger Manage event triggers
Other Commands:
plugin Manage kn plugins
completion Output shell completion code
version Show the version of this client
Plugins:
curl /Users/maximilien/.config/kn/plugins/kn-curl
source-github /Users/maximilien/.config/kn/plugins/kn-source_github
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maximilien, rhuss 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 |
This works on all levels. Test needs to be expanded still.
Fixes #266
Fixes #904