-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix: Filter out che commands imported by plugins/contributions #194
Conversation
.filter(command => !command.attributes || (command.attributes as any)['controller.devfile.io/imported-by'] !== 'editor') | ||
.filter(command => !command.attributes || (command.attributes as any)['controller.devfile.io/imported-by'] === undefined) |
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.
Another case that just occurred to me that we may want to cover -- there's a special case when devfiles use parent
s. In this case, the command would have the attribute controller.devfile.io/imported-by: "parent"
(hard-coded, by DWO). Should we include those commands?
E.g. see the example in this issue: eclipse-che/che#22103 -- we likely want to include the commands from the java-maven parent.
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 catch. Thanks @amisevsk !
I've prepared a fix in the draft PR https://github.com/che-incubator/che-code/pull/197/files. Will test it once the dogfoding instance is fixed (eclipse-che/che#22108) and merge.
Build 3.6 :: code_3.x/496: Console, Changes, Git Data |
Build 3.6 :: sync-to-downstream_3.x/2799: Console, Changes, Git Data |
What does this PR do?
Filters out che commands imported by plugins/contributions as they are not expected to be run by the user.
What issues does this PR fix?
eclipse-che/che#22098
implements the suggestion #192 (review)
How to test this PR?
init-che-code-command
command among thedevfile
-type Tasks.