techgaun / active-forks

Find active github forks of a repo https://git.io/vSnrC
https://techgaun.github.io/active-forks/index.html
2.28k stars 295 forks source link

Fetch more than 30 forks #13

Open Newgap opened 5 years ago

Newgap commented 5 years ago

Forks from GitHub are paged 30 at a time. It would be nice to fetch them all for large projects (many forks).

techgaun commented 5 years ago

@Newgap thats a good point. Would be open for a PR from community as I have couple of busy weeks.

Syed-Umair commented 5 years ago

I will work on this.

techgaun commented 5 years ago

all yours @Syed-Umair

Syed-Umair commented 5 years ago

@techgaun, Do you need me to load specific amount of forks data like 100 or all that is available.

techgaun commented 5 years ago

@Syed-Umair I think the best would be to follow the guidelines and put lazy loading or page numbering at the bottom of the page: https://developer.github.com/v3/guides/traversing-with-pagination/

You should be able to use the Link headers information to do this

Syed-Umair commented 5 years ago

Ok, I will do that.

Newgap commented 5 years ago

Don't forget that if we change the sorting, you will need to refetch the data from GitHub with that new sorting. Or, you can fetch all data in memory and sort that instead.

techgaun commented 5 years ago

@Newgap agreed. I am however not sure if we really want to fetch all data. For examle, facebook/react has 20K forks and not sure how helpful/useful would it be to pull them all. But, again, for something like such repos, this tool might not be used as often and could be potential trade-off? Just not sure what would be the best way to get around this. Thoughts?

ModischFabrications commented 4 years ago

Can we set the number of forks to be fetched via UI instead of using a max of 100 like in #14? I usually use this tool to find the fork with the latest commit, which is impossible or at least very luck-based with repos with more than 100 forks.

techgaun commented 4 years ago

@ModischFabrications fair point. That's probably a good idea. Will try to get that in soon