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

add --names option #67

Closed Riyabelle25 closed 2 years ago

Riyabelle25 commented 2 years ago

solves #50, by adding the --names option.

.option('names', {
            alias: 'n',
            default: false,
            describe: 'Shows the list of repo names with their owner',
            type: 'boolean',
        })

On setting true it outputs the list of repos-with-their owner instead of the repo-report table. will remove the alias if it's not required here, or can come up with a more meaningful name for the option

cc: @ljharb

ljharb commented 2 years ago

What do you think about https://github.com/ljharb/repo-report/pull/67#pullrequestreview-893967441 ?

Riyabelle25 commented 2 years ago

I think it's o-kay for now. Moving those functionalities to a separate utils file would defy the purpose of having detail.js, as it's most of the code from there (L105 - L122). It looks like it might complicate things for the sake of better modularity

ljharb commented 2 years ago

That's true that it's the bulk of the detail command - but the "generateDetailTable" call is really the point of that, getting repo names is incidental.

I'm happy to land this as-is, but I'll probably refactor it this way anyways :-)

Riyabelle25 commented 2 years ago

Aight. Perhaps I can open a separate issue addressing this once the current PR is merged?

ljharb commented 2 years ago

Turns out we already had repo-report ls, but it'd been broken at some point, so I moved this code into that separate (re-created) command :-)

Riyabelle25 commented 2 years ago

Woah! Just saw your refactored code 🙌