mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Gitlab Self-managed Support (#56)
* Update UI to ask for URL for Gitlab as provider. * Create state for each source control in factory. * Save url for SourceControl when given. * Make Gitlab dynamically use correct URL (custom or default) * Update SourceControlsTest to check for custom url when given. * Style fixes. --------- Co-authored-by: Saeed Vaziry <61919774+saeedvaziry@users.noreply.github.com>
This commit is contained in:
@ -17,4 +17,40 @@ public function definition(): array
|
||||
'access_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
public function gitlab(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::GITLAB,
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function github(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::GITHUB,
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function bitbucket(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::BITBUCKET,
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
public function custom(): Factory
|
||||
{
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'provider' => \App\Enums\SourceControl::CUSTOM,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user