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

Possibility of refactoring/extracting getRepositories? #50

Open
ljharb opened this issue Oct 7, 2021 · 4 comments
Open

Possibility of refactoring/extracting getRepositories? #50

ljharb opened this issue Oct 7, 2021 · 4 comments
Assignees

Comments

@ljharb
Copy link
Owner

ljharb commented Oct 7, 2021

The combination of https://github.com/ljharb/repo-report/blob/main/src/commands/detail.js#L41 and https://github.com/ljharb/repo-report/blob/main/src/utils.js#L111 is what's used to get a list of all the repos I care about.

First, now that we only have one command left (#48), we can probably refactor so that getRepositories is one single function.

Second, there are other use cases where I'll want to perform an action on "every repo i care about" - so it might be nice to extract that function into a separate package, so other things can reuse it.

@Riyabelle25
Copy link
Contributor

Riyabelle25 commented Feb 25, 2022

@ljharb is this what you'd been talking about before - i.e adding an option in repo-report to output all the repositories returned by funcgetRepositories?
So that repo-report-cache, can run repo-report -<new option> to get all repos of a user?

@ljharb
Copy link
Owner Author

ljharb commented Feb 25, 2022

Yes, exactly.

@Riyabelle25
Copy link
Contributor

Right, I've coded in a new option names alias n that does this. Shall I make a PR mentioning this issue?

@ljharb
Copy link
Owner Author

ljharb commented Feb 25, 2022

I don’t think it needs a short option, just the long one, but yes, that sounds great :-)

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