31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-05-29 03:50:46 +00:00

Merge pull request #285 from zero-24/zero-24-patch-1

Avoid github deprecation mails when using the token
This commit is contained in:
Roland Dalmulder 2020-07-25 14:48:34 +02:00 committed by GitHub
commit 409e5d9aa6
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'))