-
-
Notifications
You must be signed in to change notification settings - Fork 585
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 DDEV Fig spec generation #4216
Conversation
Download the artifacts for this pull request: |
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.
Congrats on the tests being fine!
These will need to be installed, normally, right? So:
- Can brew install them? They should be added there.
- Can apt install fig completions? They should be added there.
- Docs should explain how to manually install.
- If it can be pushed to fig's cloud, maybe that should be done by the master build github action?
Manually added a PR to Fig to add the command: withfig/autocomplete#1513 |
@rfay no, there is nothing to install. The generated file has been PR'd to become part of the Fig repo, so people who use Fig don't have to do anything. The reason for this PR is because it integrates with If you want the spec to be auto-updated via CI, you can optionally follow the steps here (I don't have the access/creds to do any of this): https://fig.io/docs/guides/integrating/push-to-autocomplete-action ...which will re-generate the spec for every version of DDEV, and push it to their repo |
If there's anything else you need me to do here, just let me know @rfay |
I'll go ahead and bring this in. I would certainly like a PR to auto-push to fig. I'm happy to help you figure that out. |
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.
Thanks!
@khalwat could you please add to the DDEV developer docs step-by-step on how to generate and submit the fig completions? Thanks! It's a nice tool. |
The Problem/Issue/Bug:
This FR automatically generates a Fig spec for Fig, as part of the
ddev_gen_autocompletes
command, so it does so as part of the automated build process.This brings full terminal autocomplete for all Fig commands, with complete inline documentation. The resulting file does nothing on its own, but then you can either push the spec to the autocomplete repo or push it to Fig's cloud.
Then it will be available to everyone who uses Fig.
How this PR Solves The Problem:
This PR allows us to easily submit a Fig autocomplete for DDEV, so that everyone who uses Fig will benefit.
Manual Testing Instructions:
Run:
To see the resulting generated Fig Spec Typescript file.
Automated Testing Overview:
No tests are introduced, as I saw no testing being done on the bash/zsh/etc autocomplete files, and the resulting file is just a generated file that does nothing until submitted as mentioned above.
Related Issue Link(s):
It uses an officially provided module for Cobra to do the work.
Release/Deployment notes:
Nothing needs to be changed for release/deployment.