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
fix: don't include unenrolled channels and hubs when prompting user for edge:channels:unenroll #513
fix: don't include unenrolled channels and hubs when prompting user for edge:channels:unenroll #513
Conversation
🦋 Changeset detectedLatest commit: 7874446 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/cli/README.md
Outdated
prompt user for a channel the given hub is enrolled in and then unenroll it | ||
|
||
$ smartthings edge:channels:unenroll 2fa0912f-cb73-424e-97f9-ffff76ea4f2a | ||
|
||
unenroll the hub from the specified channel |
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.
What is the difference between these two examples? The first seems to be showing unenrolling a hub from a channel, and the second is "unenroll[ing] the hub from the specified channel".
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.
The first example doesn't provide any arguments, so the user will be shown a list of hubs and prompted to choose one, then shown a list of channels that hub is subscribed to and prompted to choose one. The second example gives one argument -- the UUID of a hub -- so it'll skip straight to asking for the channel to unsubscribe that specific hub from. The third example specifies the UUID of both the hub and the channel to unenroll it from, so the user won't be prompted for anything else.
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.
In the second example (last of the three), nothing is prompted for. In the first, the user doesn't specify a channel on the command line so they are prompted for one. I've updated the text to say "unenroll the specified hub from the specified channel".
@@ -14,6 +14,7 @@ import { | |||
chooseOptionsDefaults, | |||
chooseOptionsWithDefaults, | |||
forAllOrganizations, | |||
ListDataFunction, |
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.
GitHub Actions noticed that ListDataFunction
isn't used.
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.
Oops, fixed.
…or edge:channels:unenroll
7d857ef
to
7874446
Compare
edge:channels:unenroll
since I was updating itChooseOptions
type now includes optionallistItems
sochooseX
methods can easily support alternate listsChooseOptions
is now generic solistItems
can require function that returns list of the correct thingsChooseOptions
is usedchooseHubs
andchooseChannel
to support alternatelistItems
chooseHubs
andchooseChannel
Checklist
npm run lint
produces no warnings/errors)