mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
fix unhandled source control exceptions (#364)
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Exceptions\FailedToDestroyGitHook;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
@ -55,6 +56,9 @@ public function deployHook(): void
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FailedToDestroyGitHook
|
||||
*/
|
||||
public function destroyHook(): void
|
||||
{
|
||||
$this->sourceControl->provider()->destroyHook($this->site->repository, $this->hook_id);
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\SiteStatus;
|
||||
use App\Exceptions\FailedToDestroyGitHook;
|
||||
use App\Exceptions\SourceControlIsNotConnected;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\SiteTypes\SiteType;
|
||||
@ -252,6 +253,7 @@ public function enableAutoDeployment(): void
|
||||
|
||||
/**
|
||||
* @throws SourceControlIsNotConnected
|
||||
* @throws FailedToDestroyGitHook
|
||||
*/
|
||||
public function disableAutoDeployment(): void
|
||||
{
|
||||
|
Reference in New Issue
Block a user