GitLabPHP / Client

GitLab API v4 client for PHP
MIT License
932 stars 451 forks source link

[11.15] Repository branch and file check existence methods #782

Open misantron opened 10 months ago

misantron commented 10 months ago

Hello, take a look please

misantron commented 9 months ago
try {
   $this->head($uri, []);

   return true;
} catch (Gitlab\Exception\RuntimeException $ex) {
   if (404 === $ex->getCode()) {
      return false;
   }
   throw $ex;
}

@GrahamCampbell can I use such a code to handle exception and check entity existence?