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

Log repositories not matching requirements #206

Open
zillemarco opened this issue Oct 3, 2023 · 7 comments
Open

Log repositories not matching requirements #206

zillemarco opened this issue Oct 3, 2023 · 7 comments
Labels
data-generation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zillemarco
Copy link
Contributor

zillemarco commented Oct 3, 2023

Since we have multiple reasons why a project is not added (namely stars count and issues count) and we have different places where we do filter those out (for GitHub is a mix of GraphQL query and manual filter, for GitLab is only manual filter).

Probably, a good way to handle this would do all the queries and then iterate over the repos coming from a source and see if it's there or not, and log those results.

Originally posted by @zillemarco in #171 (comment)

@lucavallin lucavallin added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers data-generation labels Oct 4, 2023
@dnafication
Copy link
Contributor

Hey @zillemarco, sounds interesting. It will definitely simplify the filtering process. Where would you like that to be logged?

@zillemarco
Copy link
Contributor Author

Do you mean where to create the log file with the actual logs, or where to log the data inside the code? 🤔

For the file, I thing we can stick with console.log as it's already used. For where to do the logging I think the best place would be on the last execution block inside data/get.ts, right before the sitemap build 🤔

But I'm sure @lucavallin would be able to tell you if that's ok or if there are better ways/places 🙂

@lucavallin
Copy link
Owner

@dnafication agree with @zillemarco. We just need a way to see repos that don't meet criteria (anymore). Maybe in the Actions workflow summary would be a reasonable place for that.

@dnafication
Copy link
Contributor

Great! I have some ideas around refactoring the get.ts file and making it modular and more readable. I'll include the logging changes there. I'll send a PR soon.

@dnafication
Copy link
Contributor

Hey @lucavallin @zillemarco, I was thinking of introducing .env file to the project and add all these vars below and more to the file.

REPOS_PER_REQUEST=25
MAX_ISSUES=10
GH_PERSONAL_ACCESS_TOKEN=
... any others in the future

@lucavallin you might need to update Vercel's deployment config to support these changes so let me know if its worth a change.

@dnafication
Copy link
Contributor

At first, my idea was to record comprehensive information regarding why a repository didn't meet the criteria. However, it appears that filtering occurs at various stages, such as during the GraphQL query and subsequent processing of its results.

Now, I'm planning to generate a comparison between the original list and the filtered list and logging only that information. Do you believe this would suffice, or should we still include specifics about why a particular repository failed to meet the criteria?

Perhaps, this can be the initial iteration and we can add more logic to it. I have made the code modular and refactored the main script to make it readable. I'll send the PR soon.

@lucavallin
Copy link
Owner

@dnafication I am happy to add the .env file, but first, what problem does it solve?
For the rest, all good. I think a list of repositories filtered out without details is fine for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-generation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants