mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 05:56:16 +00:00
API Feature (#334)
This commit is contained in:
@ -14,6 +14,18 @@ class Gitlab extends AbstractSourceControlProvider
|
||||
|
||||
protected string $apiVersion = 'api/v4';
|
||||
|
||||
public function createRules(array $input): array
|
||||
{
|
||||
return [
|
||||
'token' => 'required',
|
||||
'url' => [
|
||||
'nullable',
|
||||
'url:http,https',
|
||||
'ends_with:/',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function connect(): bool
|
||||
{
|
||||
$res = Http::withToken($this->data()['token'])
|
||||
|
Reference in New Issue
Block a user