active-forks icon indicating copy to clipboard operation
active-forks copied to clipboard

Fetch more than 30 forks

Open Newgap opened this issue 7 years ago • 10 comments

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

Newgap avatar Oct 10 '18 18:10 Newgap

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

techgaun avatar Oct 10 '18 18:10 techgaun

I will work on this.

Syed-Umair avatar Oct 10 '18 19:10 Syed-Umair

all yours @Syed-Umair

techgaun avatar Oct 10 '18 19:10 techgaun

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

Syed-Umair avatar Oct 10 '18 19:10 Syed-Umair

@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

techgaun avatar Oct 10 '18 19:10 techgaun

Ok, I will do that.

Syed-Umair avatar Oct 10 '18 19:10 Syed-Umair

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.

Newgap avatar Oct 11 '18 14:10 Newgap

@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?

techgaun avatar Oct 11 '18 15:10 techgaun

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.

ModischFabrications avatar Dec 18 '19 10:12 ModischFabrications

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

techgaun avatar Dec 18 '19 16:12 techgaun