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

Fix contributors endpoint for empty repos #1025

Merged
merged 8 commits into from
Jul 12, 2018

Conversation

d12
Copy link

@d12 d12 commented Jun 12, 2018

Fixes #912
Closes #994

Me, @srinjoym and @BenEmdon finished up @Kadaaran 's work from #994, fixing the timeout bug in the contributors endpoint.

GitHub returns a 204 when asking for statistics on empty repos. Previously, Octokit would continue to retry until the retry timeout was reached.

This PR just returns [] when a 204 is returned.

Also wrote a few tests showing we don't retry when a 204 is returned, and that octokit returns [] when GitHub returns a 204.

cc @tarebyte @kytrinyx for review

@d12 d12 force-pushed the fix_contributors_endpoint branch from 003735a to 42c02e4 Compare June 12, 2018 20:46
@d12 d12 changed the title [WIP] Fix contributors endpoint for empty repos Fix contributors endpoint for empty repos Jun 12, 2018
Copy link
Member

@tarebyte tarebyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, @kytrinyx mind giving this one more 👀

@d12
Copy link
Author

d12 commented Jun 25, 2018

Friendly bump @kytrinyx :)

@d12
Copy link
Author

d12 commented Jul 12, 2018

bump @tarebyte @kytrinyx

@tarebyte tarebyte merged commit ffae5dd into octokit:master Jul 12, 2018
@d12 d12 deleted the fix_contributors_endpoint branch July 12, 2018 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug when using stats API on empty repos
2 participants