31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-03 22:20:48 +00:00

avoid github deprecation mails when using the token

This commit is contained in:
Tobias Zulauf 2020-07-05 11:17:38 +02:00 committed by GitHub
parent 8ca2b1dfb7
commit 69614981cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ abstract class Helper
// If an API token is set in the params, use it for authentication
if ($params->get('gh_token', ''))
{
$options->set('gh.token', $params->get('gh_token', ''));
$options->set('headers', ['Authorization' => 'token ' . $params->get('gh_token', '')]);
}
// Set the username and password if set in the params
elseif ($params->get('gh_user', '') && $params->get('gh_password'))