Open eddieajau opened 10 years ago
My suggestion is if the object will always contain the "No rate limit" text in the body, check if the response is a 404 and has that text. Something basically to make sure the 404 is actually because of the white list and not just because something else is messed up.
Yeah I thought of that, but it would be brittle because Github might change the text. Thinking about it, the 404
is probably enough (the rate limit was not found) and I think we could rely on them keeping that b/c.
The
\Joomla\Github\Package\Authorization::getRateLimit
method throws a false negative exception if users are on a white list. See:Unfortunately Github is silent on this aspect, possibly because it may only relate to github Enterprise installations.
The response object is below:
A possible fix is to ignore the
404
response and treat it as unlimited.