This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Description
There has been reports of certain atom users hitting their GitHub API limit rather often; some preliminary investigation has led me to believe the culprit might be this code block:
const token = await this.getToken(this.loginObserver.getActiveModel(), endpoint.getLoginAccount());
if (!token) {
return;
}
This is part of the function loadMentionableUsers which is hooked onto both repo observer and login observer and called on didUpdate (that's very often!). And with the check being just simply !token, in the cases where a user's stored token doesn't have sufficient oauth scope, it will just keep trying to check for scopes over and over, hence hitting the GitHub API limit very easily. We should implement better retry logic here.