good-first-issues / good-first-issues.github.io

🚀 Helps beginners make their first contributions to open source
https://good-first-issues.github.io
MIT License
6 stars 13 forks source link

Exclude a repository from the list if there are 0 issues with label `good-first-issues` #114

Open gomzyakov opened 3 months ago

joshhazelhurst123 commented 1 month ago

Hi @gomzyakov I was just taking a look at this and I thought it was interesting and I might be able to assist.

I am just trying to piece this together, does this sound like I am on the right track? Thanks.

gomzyakov commented 1 month ago

@joshhazelhurst123 Hello!

Yes, you are on the right track!

joshhazelhurst123 commented 1 month ago

Okay so based on what the API tells me here.

I can search based on number of issues with good first issue or help wanted labels. Below I have a condition that searches for good first issues that have the label 'good-first-issue' occurring 2 times or more.

I can search for 'good-first-issue' to occur 0 times or more

So to run a search where there are 0 issues with the label 'good-first-issue' I would search like below.

Which return 138m results.

Pseudocode would be, create a function that searches through the repositories to see if there is >1 'good-first-issue' then put that into a list, array, basically store that list. Then have another list that searches through the repositories that looks to see if there is <1 'good-first-issue' then discard those repositories. So I basically have no idea how to code this, any tips would really help.

gomzyakov commented 1 month ago

@joshhazelhurst123

Thanks for the excellent research work!

Based on your link:

https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories#search-based-on-number-of-issues-with-good-first-issue-or-help-wanted-labels

I looked at the API documentation:

https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-repositories

After that I thought: Maybe we should give up the repositories.json file?

You can simply take repositories from the API that have more than 2 labels good first issues and show them.

You can think in this direction and make a PR, or I will do this in a couple of weeks, and you will review my edits ;)

joshhazelhurst123 commented 1 month ago

Hi @gomzyakov thanks for reviewing what I have done and taking at look at the research that I put forward as shown above. Yes, I think giving up on the respositories.json file is a good idea. I got a bit confused with how to piece this together and code it.

joshhazelhurst123 commented last week


gomzyakov commented 4 hours ago

I would like to do a PR and code this, I am still quite unsure how to code this and put it all together. I think the logical place to put this function is in


Thanks @gomzyakov hope that makes sense. If you can you guide me on how to code this I will do a PR with you or I am happy to wait to see what you will add in a couple of weeks.