Skip to content
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 more cli options #13

Open
maddhruv opened this issue Nov 12, 2018 · 7 comments
Open

add more cli options #13

maddhruv opened this issue Nov 12, 2018 · 7 comments

Comments

@maddhruv
Copy link
Member

maddhruv commented Nov 12, 2018

we've set sort and order already in the module rather we can provide options to the cli+module

suggested options -

Option type default description
first boolean false return the first/top result
order enum [asc, desc] asc
sort enum[comments, created, updated] updated
open boolean false open the issue in browser
@maddhruv
Copy link
Member Author

first and open are done in #16
will do others in a different one
have to make changes to the module

@maddhruv maddhruv modified the milestones: 1.0.0, 0.15.0 Nov 18, 2018
@bnb
Copy link
Member

bnb commented Nov 25, 2018

Since I've changed #40 to 0.16.0, I'm also going to change this to 0.16.0 👍

@bnb bnb modified the milestones: 0.15.0, 0.16.0 Nov 25, 2018
@bnb bnb removed this from the 0.16.0 milestone Dec 3, 2018
@bnb
Copy link
Member

bnb commented Dec 3, 2018

Updated the milestone to reflect the status of #40 👍

@dopecodez
Copy link
Contributor

dopecodez commented Dec 5, 2019

I am thinking about taking this issue up. Adding sort and order shouldn't be too difficult. But i would think the best option would be to add them as string inputs. We can keep a array in a constants file in the code to list the valid options. I also think that adding a --help flag to the cli to list all the options(including --open, --first as well as available options for --sort and --order) should be taken up as well to make the working sensible.

Another option would be allow -s and -o as booleans and using inquirer to prompt the user to select from a list of valid options, although this beats the purpose of a cli app. I would go for the first approach while validating the inputs and showing valid options in case user inputs a error.

Would be great if anyone is still watching this issue to advice on what path to take. Also, should i cut a new feature branch on master to implement said features?

Edit: i was on the testing branch when i made this comment. On checking out to master, i realise that the octokit rest feature has now been shipped as a module. Any changes made in the code is meaningless without changing the code in libgfi. We should ideally create an issue on libgfi and make the necessary changes there as well.

@bnb
Copy link
Member

bnb commented Dec 5, 2019

@dopecodez feel free to create an issue/PR in libgfi! :)

@dopecodez
Copy link
Contributor

Thanks for the reply @bnb . You can expect an issue on libgfi by tomorrow and a PR shortly after. It makes sense to fix the module before taking this issue up. Once we get libgfi up to run with sort and order, we can work on this repo and add the above said options here!

@dopecodez
Copy link
Contributor

Hey @bnb , just wanted to give you a heads up that i opened up a PR in libgfi a couple of days back. It'd be great if you can have a look at it when you get the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants