GitHub auth: only use user tokens if over rate limit
This commit is contained in:
parent
58cbb18c1d
commit
a54a247f16
|
@ -154,7 +154,7 @@ function githubRequest(request, url, query, cb) {
|
||||||
};
|
};
|
||||||
var token;
|
var token;
|
||||||
|
|
||||||
if (lowestReqRemainingToken != null) {
|
if (lowestReqRemainingToken != null && lowestReqRemaining > 0) {
|
||||||
token = lowestReqRemainingToken;
|
token = lowestReqRemainingToken;
|
||||||
headers['Authorization'] = 'token ' + token;
|
headers['Authorization'] = 'token ' + token;
|
||||||
} else if (serverSecrets && serverSecrets.gh_client_id) {
|
} else if (serverSecrets && serverSecrets.gh_client_id) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user