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

@ -42,7 +42,7 @@ public function index(Project $project): ResourceCollection
#[Post('/', name: 'api.projects.source-controls.create', middleware: 'ability:write')]
#[Endpoint(title: 'create')]
#[BodyParam(name: 'provider', description: 'The provider', required: true, enum: [\App\Enums\SourceControl::GITLAB, \App\Enums\SourceControl::GITHUB, \App\Enums\SourceControl::BITBUCKET])]
#[BodyParam(name: 'provider', description: 'The provider', required: true)]
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
#[BodyParam(name: 'url', description: 'The URL if the provider is Gitlab and it is self-hosted')]
@ -61,7 +61,7 @@ public function create(Request $request, Project $project): SourceControlResourc
#[Get('{sourceControl}', name: 'api.projects.source-controls.show', middleware: 'ability:read')]
#[Endpoint(title: 'show')]
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
public function show(Project $project, SourceControl $sourceControl): \App\Http\Resources\SourceControlResource
public function show(Project $project, SourceControl $sourceControl): SourceControlResource
{
$this->authorize('view', $sourceControl);
@ -79,7 +79,7 @@ public function show(Project $project, SourceControl $sourceControl): \App\Http\
#[BodyParam(name: 'password', description: 'The password if the provider is Bitbucket')]
#[BodyParam(name: 'global', description: 'Accessible in all projects', enum: [true, false])]
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
public function update(Request $request, Project $project, SourceControl $sourceControl): \App\Http\Resources\SourceControlResource
public function update(Request $request, Project $project, SourceControl $sourceControl): SourceControlResource
{
$this->authorize('update', $sourceControl);