Allow resolver API to resolve other files than [.]devfile.yaml
See original GitHub issueIs your task related to a problem? Please describe.
Today, dashboard is using the resolver REST API to get devfile.yaml. It supports github, gitlab, bitbucket, etc and avoids to clone repository to get files in a pretty fast way.
But we do need to parse extra files like .che/che-editor.yaml
, .che/che-theia-plugins.yaml
or .vscode/extensions.json
Describe the solution you’d like
Today dashboard is calling resolver API with url parameter of the ‘devfile location’ https://github.com/eclipse/che-dashboard/blob/d611b71241fbba4f625cf33abd1ba42002ff889c/src/store/FactoryResolver.ts#L74
and then it gets data.devfile with the content of the devfile
So here, we could add extra argument like the other files that we may want to extract with relative path from the git repository of the devfile
In addition of url
, provide extraFiles
, files
being an optional array of string (or any other format/parameter name)
and then we can have content of files in returned data
like data.files.<name-of-file>.content
providing the content of the file and data.files.<name-of-file>.status saying if the file was there or not (or having content being undefined)
Describe alternatives you’ve considered
Feel free to update resolver method, as long as we can provide extra files to get and get the content (if file exist) in the result, it’s 👍
Additional context
Part of DevWorkspace
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top GitHub Comments
So the following scheme is proposed and not meet any objections:
We had a call this morning and considered that milestone 2 due date is the 19th of June and that retrieving the editor and theia plugins from the git repository is a fundamental feature of that milestone we should:
So next step is for @mshaposhnik to propose a change of the current API that could be consumed by the dashboard to retrive these new files. The proposal should be discussed next monday during the DevWorkspace cabal call.