-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
RFC: Refactor CLI into a single program, using argparse #462
Conversation
source/commands/danger.ts
Outdated
entryPoint: (args: any) => { | ||
dangerRun.main(args as dangerRun.App) | ||
}, | ||
}) |
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.
There's a lot of repetition here which could be tightened up.
Want to leave this with me to wrap up? |
I took a look into argparse, it has the exact same flaw as commander: no support for the subparsers being optional ( nodeca/argparse#58 nodeca/argparse#99 ) so I threw a few hours last night and this morning at adding it and couldn't get very far ( current WIP is in https://github.com/danger/danger-js/tree/paulmelnikow-refactor-cli ) |
Lemme give that a poke. If it comes down to it I'd rather hack on argparse than on commander; the behavior is better documented and the code is in better shape. Worst case, we could wrap a try-catch around the |
There's a |
OK, so I gave it a look yesterday also and figured it was probably time to take a clean look at all the CLI and ended up in a different place, I simplified Danger's CLI options and added a lot more documentation in #465 Docs: https://github.com/danger/danger-js/pull/465/files#diff-4ac32a78649ca5bdd8e0ba38b7006a1eR11 |
Alright, seems like I should close this. Maybe I can jump in some other place. |
Thanks for the PR @paulmelnikow. We conform to the Moya Community Continuity Guidelines, which means So, we've sent you an org invite - thanks 🎉 Generated by 🚫 dangerJS |
Peril still gave you invite for helping - that counts to me 👍 Thanks @paulmelnikow - dunno if this would have got fixed had you not started this |
See #177 (comment).