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:
Koen Hendriks
2023-09-25 10:11:01 +02:00
committed by GitHub
parent 7d98986f52
commit 1e1204fe40
7 changed files with 176 additions and 14 deletions

View File

@ -32,6 +32,17 @@
@enderror
</div>
@if($provider === App\Enums\SourceControl::GITLAB)
<div class="mt-6">
<x-input-label for="url" value="Url (optional)" />
<x-text-input wire:model.defer="url" id="url" name="url" type="text" class="mt-1 w-full" placeholder="e.g. https://gitlab.example.com/" />
<x-input-help>If you run a self-managed gitlab enter the url here, leave empty to use gitlab.com</x-input-help>
@error('url')
<x-input-error class="mt-2" :messages="$message" />
@enderror
</div>
@endif
<div class="mt-6">
<x-input-label for="token" value="API Key" />
<x-text-input wire:model.defer="token" id="token" name="token" type="text" class="mt-1 w-full" />