-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
User Scripts #5891
Comments
user command or dotfiles repo? #5198 |
That's a really good question. One could argue that running a script is the more powerful abstraction, as I could clone any (dotfile) repo and run arbitrary initializers. OTOH automatically (and conveniently) applying the conventions of a user's dotfile repo certainly makes sense, too. |
Dotfiles are definitely a possible alternative. In my opinion a mixing of the two ideas like the second storage option I listed (editable bash files in dashboard) would be the best option, as it gives almost as much customization as dotfiles, without the issue of loading a repository. Perhaps the user could even mark if the script was an init task or a command, matching the dotfile system. The one issue I see with dotfiles is the repository, as gitpod currently has no builtin system for mixing repositories (correct me if I'm wrong.) With all the different platforms to support (and hopefully soon regular git repositories) it seems like it would be a lot of extra work (and time) for the system to download the repo, search through the files, run them, then add the files to PATH. This would just increase the workspace start time (even with prebuilds), which is a major selling point of gitpod. I'd think it would be much easier and faster to just reuse the code from user environment variables and start tasks to run the scripts or add them to the PATH from the user settings. (Again, correct me if I am wrong.) This also allows for the individual scripts to have scopes too, which can't be done in dotfiles. TL;DR Dotfiles in the Dashboard stored internally. Each script can be marked as init or command. Init ones are run at startup, command ones are stored in the PATH directory. This allows for scoped scripts that do not majorly increase start time. PS: I'm changing the name to user scripts as I agree that scripts would be much more useful. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Explanation
Currently, there are user extensions, user vscode settings, and user environment variables. I propose that user tasks are added. They would be run at command (or in their own step), and can be configured in the dashboard like environment variables with a scope.
Reasoning
There are many tasks a user may want run in their workspaces without adding it to all their projects' configs (or other people's configs, which can't be edited by the user). A few examples I can think of are setting up gpg git signing, adding a WakaTime key, and installing some tool the user likes. There are many issues already that this feature would solve including #666.
Storage
User Tasks should be editable in the dashboard like user environment variables. The best way I can think to store them is as values like the current user environment variable system or editable bash files (I think this would be better, as they would be extremely flexible and easy to implement using prism).
If this issue shows some interest, I may try and implement a simple proof of concept.
The text was updated successfully, but these errors were encountered: