Plugins base (#613)

* wip

* wip

* cleanup

* notification channels

* phpstan

* services

* remove server types

* refactoring

* refactoring
This commit is contained in:
Saeed Vaziry
2025-06-14 14:35:18 +02:00
committed by GitHub
parent adc0653d15
commit 131b828807
311 changed files with 3976 additions and 2660 deletions

View File

@ -3,11 +3,14 @@
namespace Database\Factories;
use App\Models\SourceControl;
use App\SourceControlProviders\Bitbucket;
use App\SourceControlProviders\Github;
use App\SourceControlProviders\Gitlab;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends Factory<\App\Models\SourceControl>
* @extends Factory<SourceControl>
*/
class SourceControlFactory extends Factory
{
@ -17,39 +20,39 @@ public function definition(): array
{
return [
'access_token' => Str::random(10),
'provider' => \App\Enums\SourceControl::GITHUB,
'provider' => Github::id(),
'profile' => $this->faker->name,
'project_id' => null,
];
}
/**
* @return Factory<\App\Models\SourceControl>
* @return Factory<SourceControl>
*/
public function gitlab(): Factory
{
return $this->state(fn (array $attributes): array => [
'provider' => \App\Enums\SourceControl::GITLAB,
'provider' => Gitlab::id(),
]);
}
/**
* @return Factory<\App\Models\SourceControl>
* @return Factory<SourceControl>
*/
public function github(): Factory
{
return $this->state(fn (array $attributes): array => [
'provider' => \App\Enums\SourceControl::GITHUB,
'provider' => Github::id(),
]);
}
/**
* @return Factory<\App\Models\SourceControl>
* @return Factory<SourceControl>
*/
public function bitbucket(): Factory
{
return $this->state(fn (array $attributes): array => [
'provider' => \App\Enums\SourceControl::BITBUCKET,
'provider' => Bitbucket::id(),
]);
}
}