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

Feature Request/Bug: Repository limit is 100 #23

Closed
BaseMax opened this issue Jul 29, 2020 · 3 comments · Fixed by #29
Closed

Feature Request/Bug: Repository limit is 100 #23

BaseMax opened this issue Jul 29, 2020 · 3 comments · Fixed by #29
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@BaseMax
Copy link

BaseMax commented Jul 29, 2020

Hi Khushbu,

I have about 300 public repository. But your app only receives 100 of them.
Because GitHub web services only give 100.
But you have to scan page by page.

Read more:
https://developer.github.com/v3/#pagination


Take a look at this example:
https://github.com/BaseMax/GitHubBackupArchiver/blob/master/download-repositories.php#L7

Regards,
Max

@ChoukseyKhushbu
Copy link
Owner

ChoukseyKhushbu commented Jul 29, 2020

Hi Max,
I knew about this (from the GitHub documentation) when I started working on GitZilla.
But I took it lightly as I didn't know GitZilla will get such an amazing response from the dev community.
Also, another reason is fetching all the repositories at a time will increase the loading time which will not result in good user experience. Hence I thought to just limit to single page.

This is my current code in src/components/User.jsx -
image

Thanks for finding out this issue and reminding me again and giving an example.
I will look into it and fix this very soon.
I am thinking of something like fetching 100 repositories first and show them first and then fetching more as the user scrolls down. This will decrease the loading time.

But I am not very sure. As I don't know much about pagination and fetching. I am a beginner in react and working with API too.

Please suggest your views on this.

Thank you.

@monkfromearth
Copy link
Contributor

monkfromearth commented Jul 29, 2020

Self-assigning myself for this issue.

A good quick way to fix this would be adding a button for more, which is rendered only when the user's user.public_repos > page_number * 100.

Here, page_number, initially 1 is the current page number.

A simple fetch request can be made, and the data can be appended to the repos state.

@ChoukseyKhushbu
Copy link
Owner

Self-assigning myself for this issue.

A good quick way to fix this would be adding a button for more, which is rendered only when the user's user.public_repos > page_number * 100.

Here, page_number, initially 1 is the current page number.

A simple fetch request can be made, and the data can be appended to the repos state.

Glad to see your suggestion but I already started working on this issue. It will be fixed soon.
Thank you! 😄

@ChoukseyKhushbu ChoukseyKhushbu self-assigned this Jul 30, 2020
@ChoukseyKhushbu ChoukseyKhushbu added bug Something isn't working enhancement New feature or request labels Jul 30, 2020
@ChoukseyKhushbu ChoukseyKhushbu linked a pull request Nov 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants