-
Notifications
You must be signed in to change notification settings - Fork 43
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: prompt for login any time a user omits API key #636
Merged
kanadgupta
merged 9 commits into
main
from
kanad/rm-5540-if-user-omits-key-prompt-them-for-login
Oct 13, 2022
Merged
feat: prompt for login any time a user omits API key #636
kanadgupta
merged 9 commits into
main
from
kanad/rm-5540-if-user-omits-key-prompt-them-for-login
Oct 13, 2022
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
kanadgupta
added
enhancement
New feature or request
command:docs
Issues pertaining to the `docs`, `changelogs`, or `custompages` commands
command:openapi
Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands
command:versions
Issues pertaining to the `versions` commands
command:categories
Issues pertaining to the `categories` commands
command:other
Issues pertaining to miscellaneous commands (e.g. `open`, `logout`) or requests for new commands
labels
Oct 12, 2022
Now we split our `--key` tests into two tests: one for CI, and one for non-CI.
kanadgupta
requested review from
erunion,
a team,
dannobytes,
trishaprile and
darrenyong
and removed request for
a team
October 12, 2022 23:12
erunion
approved these changes
Oct 12, 2022
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.
well shit, you made this look easy. we should've had these commands do this this whole time.
TS handles this now
... and refactor console.info statements to use that instead
Co-Authored-By: Jon Ursenbach <[email protected]>
kanadgupta
deleted the
kanad/rm-5540-if-user-omits-key-prompt-them-for-login
branch
October 13, 2022 15:00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
command:categories
Issues pertaining to the `categories` commands
command:docs
Issues pertaining to the `docs`, `changelogs`, or `custompages` commands
command:openapi
Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands
command:other
Issues pertaining to miscellaneous commands (e.g. `open`, `logout`) or requests for new commands
command:versions
Issues pertaining to the `versions` commands
enhancement
New feature or request
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.
🧰 Changes
This updates all of our commands so that when they're run locally and the user omits the
--key
parameter (and they're running the command from a non-CI environment), we now prompt the user to log in, rather than just erroring out. Most of this diff is just a super tiny refactor to all commands and then refactoring a bunch of tests to account for this change.Here's what it looks like when a user omits the
--key
flag and attempts to run a command that requires authentication:Screen.Recording.2022-10-12.at.6.05.13.PM.mov
Also did a tiny bit of test housekeeping:
docs:edit
tests to be consistent with every other test suite 🧹login
command nocks 💪🏽🧬 QA & Testing
Our testbed covers this, but if you want to test this out, you can check out this branch and run this flow of commands: