public function register()
 {
     $this->app->singleton('phabricator', function () {
         $phabricator = new PhabricatorAPI(new \ConduitClient($_ENV['PHABRICATOR_URL']));
         $phabricator->connect($_ENV['PHRAGILE_BOT_NAME'], $_ENV['PHRAGILE_BOT_CERTIFICATE']);
         return $phabricator;
     });
 }
Exemplo n.º 2
0
 public function certificateValid($certificate = null)
 {
     try {
         $phabricator = new PhabricatorAPI(new ConduitClient($this->phabricatorURL));
         $phabricator->connect($this->username, $certificate ?: $this->conduit_certificate);
     } catch (ConduitClientException $e) {
         return false;
     }
     return true;
 }