Open
Description
Issue
If a branch name has slashes, the compare function does not work and throws an error
Replicate:
<?php
require __DIR__ . "/vendor/autoload.php";
use Gitlab\Client;
$client = new Client();
$client->setUrl("url");
$client->authenticate("token", Client::AUTH_HTTP_TOKEN);
$comparison = $client->repositories()->compare(
123,
"fix/branch_name",
"develop"
);
print_r($comparison);
Thrown:
Fatal error: Uncaught Gitlab\Exception\RuntimeException: 404 Ref Not Found in gitlab-test/vendor/m4tthumphrey/php-gitlab-api/src/HttpClient/Plugin/ExceptionThrower.php:78
Stack trace:
#0 gitlab-test/vendor/m4tthumphrey/php-gitlab-api/src/HttpClient/Plugin/ExceptionThrower.php(53): Gitlab\HttpClient\Plugin\ExceptionThrower::createException(404, '404 Ref Not Fou...')
Metadata
Metadata
Assignees
Labels
No labels