Repository @if (data_get($application, 'source.is_public') === false && $application->source instanceof \App\Models\GithubApp) Git app @endif Commits
@if (blank($privateKeyId))
Connected source {{ data_get($application, 'source.name', 'No source connected') }}
@endif
@if (filled($privateKeyId))
Attached private key {{ $privateKeyName }}
@can('update', $application)
@forelse ($privateKeys as $key) @empty @endforelse
@endcan
@else @can('update', $application) @php $currentSource = $application->source; $currentSourceMorph = $currentSource?->getMorphClass(); $currentSourceIsGithub = $currentSourceMorph === \App\Models\GithubApp::class; $currentSourceIsGitlab = $currentSourceMorph === \App\Models\GitlabApp::class; $currentSourceSubtitle = match (true) { $currentSourceIsGithub && filled(data_get($currentSource, 'organization')) => 'GitHub · '.$currentSource->organization, $currentSourceIsGithub => data_get($currentSource, 'is_public') ? 'Public GitHub' : 'GitHub · Personal account', $currentSourceIsGitlab && filled(data_get($currentSource, 'group_name')) => 'GitLab · '.$currentSource->group_name, $currentSourceIsGitlab => 'GitLab · Personal account', default => 'Connected source', }; @endphp
@if ($currentSource)
{{ $currentSource->name }}

{{ $currentSourceSubtitle }}

@endif @forelse ($sources as $source) @php $sourceMorph = $source->getMorphClass(); $sourceIsGithub = $sourceMorph === \App\Models\GithubApp::class; $sourceIsGitlab = $sourceMorph === \App\Models\GitlabApp::class; $sourceSubtitle = match (true) { $sourceIsGithub && filled($source->organization) => 'GitHub · '.$source->organization, $sourceIsGithub => data_get($source, 'is_public') ? 'Public GitHub' : 'GitHub · Personal account', $sourceIsGitlab && filled($source->group_name) => 'GitLab · '.$source->group_name, $sourceIsGitlab => 'GitLab · Personal account', default => 'Git source', }; @endphp @empty @if (! $currentSource) @endif @endforelse
@if ($currentSource && $sources->isEmpty())

No other sources available. Connect another source to switch providers.

@endif
@endcan @endif