31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-05-28 11:30:47 +00:00

Update GitHub.php

As basic authentication no longer can be set, basic authentication should be removed.
This commit is contained in:
Patrick Jackson 2021-03-21 00:23:49 +11:00 committed by GitHub
parent 5a44f045aa
commit fb4e987bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,27 +135,6 @@ class GitHub
// Get a new Uri object using the API URL and given path.
$uri = new Uri($this->options->get('api.url') . $path);
// Only apply basic authentication if an access token is not set
if ($this->options->get('gh.token', false) === false)
{
// Use basic authentication
if ($this->options->get('api.username', false))
{
$username = $this->options->get('api.username');
$username = str_replace('@', '%40', $username);
$username = str_replace('#', '%23', $username);
$uri->setUser($username);
}
if ($this->options->get('api.password', false))
{
$password = $this->options->get('api.password');
$password = str_replace('@', '%40', $password);
$password = str_replace('#', '%23', $password);
$uri->setPass($password);
}
}
// If we have a defined page number add it to the JUri object.
if ($page > 0)
{