-
Notifications
You must be signed in to change notification settings - Fork 679
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
Update configure command to support configuring feature flags #96
Merged
Chaseshak
merged 5 commits into
main
from
update-config-command-with-features-from-valet
Apr 5, 2023
Merged
Update configure command to support configuring feature flags #96
Chaseshak
merged 5 commits into
main
from
update-config-command-with-features-from-valet
Apr 5, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This uses the changes from github/valet#5879 to fetch available flags via the list-features --json flag. It parses out the possible env vars and walks the customer through setting any feature flags they desire. If there are any issues getting the available feature flags JSON, we don't ask the customer to configure feature flags, as it won't cause any breaking issues and we don't want to break the configure command.
Chaseshak
force-pushed
the
update-config-command-with-features-from-valet
branch
from
April 3, 2023 21:30
c4c321c
to
19620de
Compare
Chaseshak
force-pushed
the
update-config-command-with-features-from-valet
branch
from
April 4, 2023 22:11
a2715f4
to
3e80469
Compare
Chaseshak
commented
Apr 4, 2023
src/ActionsImporter.UnitTests/Services/ConfigurationServiceTests.cs
Outdated
Show resolved
Hide resolved
ethanis
reviewed
Apr 5, 2023
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.
Looking good!
$ dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- configure --optional-features
✔ Which features would you like to configure?: actions/cache, reusable-workflows
✔ actions/cache (enabled): Disable
✔ reusable-workflows (enabled): Disable
Environment variables successfully updated.
assyadh
reviewed
Apr 5, 2023
assyadh
approved these changes
Apr 5, 2023
Chaseshak
force-pushed
the
update-config-command-with-features-from-valet
branch
from
April 5, 2023 21:19
7f15088
to
90ac841
Compare
ethanis
approved these changes
Apr 5, 2023
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.
🎏
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's changing?
This uses the changes from github/valet#5879 to fetch available flags
via the list-features --json flag. It parses out the possible env vars
and walks the customer through setting any feature flags they desire.
This is done by adding a new configure flag:
gh actions-importer configure --optional-features
which walks the user through enabling or disabling available feature flags.If there are any issues getting the available feature flags JSON, we initialize an empty list of flags and make sure the customer is up to date.
updated-configure-command.mov
How's this tested?
dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- configure --optional-features
), it shouldn't ask you to configure flags and shouldn't errordocker pull ghcr.io/actions-importer/cli:1.2.17722
docker image tag ghcr.io/actions-importer/cli:1.2.17722 ghcr.io/actions-importer/cli:latest
docker pull ghcr.io/actions-importer/cli:latest
dotnet run --project src/ActionsImporter/ActionsImporter.csproj -- configure --optional-features
configure
command without any additional option(s) should function as it previously did.Closes github/valet#5760