1
0
Fork 0

Fix github authentication request, fixes #5767

pull/7040/head
Jordi Boggiano 2018-01-24 16:07:02 +01:00
parent e67a559db9
commit 1933532ec5
1 changed files with 3 additions and 1 deletions

View File

@ -361,7 +361,9 @@ class GitHubDriver extends VcsDriver
}
}
$scopesFailed = array_diff($scopesNeeded, $scopesIssued);
if (!$headers || count($scopesFailed)) {
// non-authenticated requests get no scopesNeeded, so ask for credentials
// authenticated requests which failed some scopes should ask for new credentials too
if (!$headers || !count($scopesNeeded) || count($scopesFailed)) {
$gitHubUtil->authorizeOAuthInteractively($this->originUrl, 'Your GitHub credentials are required to fetch private repository metadata (<info>'.$this->url.'</info>)');
}