madjar / nox

Tools to make nix nicer to use
MIT License
305 stars 35 forks source link

Check if GitHub rate limit is hit. #50

Closed matthewbauer closed 8 years ago

matthewbauer commented 8 years ago

This provides a more descriptive error than the cryptic errors of #26 and #29. Also provides a helpful command to fix the issue. "Fixes" those issues. Resolves #26. Resolves #29.

To test this:

nix-build
./result/bin/nox-review pr 16600 # should work fine
for i in {1..60}; do curl -I https://api.github.com/repos/NixOS/nixpkgs/pulls/16600; done # hit the rate limit
./result/bin/nox-review pr 16600 # should throw error
./result/bin/nox-review pr --token YOUR_TOKEN_HER 16600 # should work again
matthewbauer commented 8 years ago

@madjar Could you bump the version we can get these changes in nixpkgs?

madjar commented 8 years ago

@matthewbauer Just uploaded a new version to pypi. I'm adding it to nixpkgs now.

matthewbauer commented 8 years ago

Okay thanks!