unisonweb / elm-browser

A Unison Github repo explorer in Elm
MIT License
34 stars 4 forks source link

Handle Github rate limit #2

Closed jcmrva closed 5 years ago

jcmrva commented 5 years ago

It may not come up in ordinary use but it might be a good idea to surface this in the UI.

image

pchiusano commented 5 years ago

Is this relevant if you are grabbing content via, for example: https://raw.githubusercontent.com/unisonweb/elm-browser/master/src/Deserialize.elm or https://github.com/unisonweb/unisonbase/blob/master/.unison/v1/paths/0c3ad476251ft7dnbdiq870bj4es0vtlev2u5i4jts022mgjjnugod2sdcqli53503i21vrtim35j6pqncm2g9mglghv8aod070e5cg.ub?raw=true

Like is there still a rate limit for regular GET requests of repository files? And/or are you discouraged from using those endpoints for scripts / programs?

aryairani commented 5 years ago

I would think it’s for the “api...” endpoints but not sure. Also probably not an issue if you’re signed into github in your browser, but not certain. But even so, the user should be kept in the loop.

mitchellwrosen commented 5 years ago

Good point @jcmrva. I think that makes the simple plan of just fetching files one-by-one from GitHub somewhat DOA. It's possible to work around the rate limit by logging in, but this would require quite a bit of ceremony (esp. if you have 2fa enabled). Seems like we should pursue a different path :)

jcmrva commented 5 years ago

I'm going to close this for now as it looks like accessing the raw files per Paul's suggestion will work.