Netflix-Skunkworks / Scumblr

Web framework that allows performing periodic syncs of data sources and performing analysis on the identified results
Apache License 2.0
2.64k stars 317 forks source link

Fix crash when GitHub API rate limiting is not enabled #203

Closed acknosyn closed 6 years ago

acknosyn commented 7 years ago

After trying to set up Scumblr for GitHub Enterprise, I ran into a problem when trying to do a "Github Code Search" task. The app would raise an exception and exit.

I was getting the following error

Error: Unable to retrieve rate limit for Github!

My company's hosted GitHub Enterprise does not have rate limiting enabled. So the API call to check the rate limiting endpoint "#{@github_api_endpoint}/rate_limit?... would return a 404. The previous code catches the error and raises an exception.

My solution is to

Let me know if you want me to change anything. I tried to stick to the existing coding conventions.

sbehrens commented 7 years ago

@bradbenvenuti Pull looks good to me, as I mentioned on gitter we're currently doing a major code refactor which adds a ton of new features to the tool. I imagine we'll have that done in the next 2 weeks and merge in all those changes into Master.

During that time I will merge your PR into master as well.

Thanks for contributing!

-Scott

sbehrens commented 7 years ago

@ahoernecke This pull looks good, we can merge when we pull async-refactor back into master.

acknosyn commented 6 years ago

Hey @sbehrens, got an update on the progress of your refactor?

sbehrens commented 6 years ago

Running tests, then I'll merge this in.

sbehrens commented 6 years ago

Tests pass, thanks again for the PR.