-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add new channels from an add URL with the new --ch-add-url option #708
Conversation
Giving this a quick look -- I don't like that the format of the argument is different ( I'd also like it if passing a URL in either format works with either command. Maybe we could use https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlparse and then look at just the Thanks for the PR, in any case! |
There's a trend with arguments for channel management being prefixed with The channel sharing verbs in the iOS app are "replace" and "add" so maybe the CLI options should reflect that? For those reasons and based on your feedback, how about the following?
@ianmcorvidae looking for feedback before adding commits. |
I think that's an acceptable place to start, so go for it. I don't like the usability of telling people to edit the URL if they want to change the way it works (particularly for changing a replace-style to an add-style, which is the more important direction to be able to change it) but I think it's good for the time being. Sorry about my slow responses here, I've been slammed lately with real life. And thank you for putting in the work! |
Since I haven't heard back in a bit (probably since it took me so long to get back to you in the first place, sorry again about that) I took this over to get this across the finish line. Thanks for the contribution! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #708 +/- ##
==========================================
- Coverage 60.29% 60.12% -0.18%
==========================================
Files 24 24
Lines 3816 4053 +237
==========================================
+ Hits 2301 2437 +136
- Misses 1515 1616 +101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I added CLI option
--ch-add-url
with which one can provide an "add" URL to add new channel(s) to a node.It won't make any changes to the primary channel or any existing secondary channels with the same name as a channel in the URL.
If the provided URL is not valid, it errors out with a relevant message.