fix unhandled source control exceptions (#364)

This commit is contained in:
Saeed Vaziry
2024-11-14 22:27:51 +01:00
committed by GitHub
parent 1dfd13583a
commit 1ca72d7ddd
10 changed files with 233 additions and 437 deletions

View File

@ -2,6 +2,9 @@
namespace App\SourceControlProviders;
use App\Exceptions\FailedToDeployGitKey;
use App\Exceptions\FailedToDestroyGitHook;
interface SourceControlProvider
{
public function createRules(array $input): array;
@ -22,9 +25,15 @@ public function fullRepoUrl(string $repo, string $key): string;
public function deployHook(string $repo, array $events, string $secret): array;
/**
* @throws FailedToDestroyGitHook
*/
public function destroyHook(string $repo, string $hookId): void;
public function getLastCommit(string $repo, string $branch): ?array;
/**
* @throws FailedToDeployGitKey
*/
public function deployKey(string $title, string $repo, string $key): void;
}