ljharb / repo-report

CLI to list all repos a user has access to, and report on their configuration in aggregate.
MIT License
24 stars 11 forks source link

Command cleanup? #44

Closed ljharb closed 2 years ago

ljharb commented 2 years ago

Do we want to keep list and options and branchProtections? They both kind of seem like subsets of detail to me.

Also, the pr-status command seems like maybe it should be a separate project (a separate one already exists, also not yet public).

If in fact all of these can/should be dropped or moved to another project, then perhaps we could make detail be the default command?

thehanimo commented 2 years ago

Yup absolutely! Running repo-report should default to detail imo. I'm also in favour of removing options but I kinda like the list command. detail is huuge and I think sometimes its useful to just see all of my repos with the access I have (and maybe defbranch?). I was also thinking we should rename it to ls.

thehanimo commented 2 years ago

Also, I'm not sure if the ls command is a good use-case for the target users. Just that I kinda like it :)

ljharb commented 2 years ago

Is there an option that could be passed to detail that limited it just to the metrics list displays?

thehanimo commented 2 years ago

detail -p DefBranch -p Access --actual comes close. But with #46, we'll need to pass in all focus filters too. Also these will be grouped so it's not one repo per row like in list.

ljharb commented 2 years ago

Maybe removing default branch and access from list by default, and requiring -p to specify what’s included, would make sense?

That way, by default it really is just a list of repos.

thehanimo commented 2 years ago

Yup that makes sense. But I don't think we should give the -p flag. That's essentially the same as detail -p.

thehanimo commented 2 years ago

This way we can have 2 use-cases:

  1. repo-report
  2. repo-report ls

I'm not really sure if ls is required tho. repo-report ls doesn't sound right.

ljharb commented 2 years ago

Having -p be the same as list is what I’m suggesting :-) namely, that list is a shortcut for “detail, but default to no metrics”

thehanimo commented 2 years ago

Should ls be allowed to take in all flags that detail does or none? 🤔

ljharb commented 2 years ago

Probably most? it's really just a wrapper around detail with some specific args, no?

thehanimo commented 2 years ago

Got it! Just wanted to make sure I understood it correctly.

ljharb commented 2 years ago

Fixed in #48.