mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(api): add Gitea App endpoints for sources and applications
Add GET /gitea-apps, POST /applications/private-gitea-app, and
gitea_app_uuid in PATCH /applications/{uuid}, with OpenAPI docs and MCP tool support.
Closes #12459
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4bdf03db69
commit
3bc82eb71d
@@ -507,6 +507,7 @@ function removeUnnecessaryFieldsFromRequest(Request $request)
|
||||
$request->offsetUnset('domains');
|
||||
$request->offsetUnset('instant_deploy');
|
||||
$request->offsetUnset('github_app_uuid');
|
||||
$request->offsetUnset('gitea_app_uuid');
|
||||
$request->offsetUnset('private_key_uuid');
|
||||
$request->offsetUnset('use_build_server');
|
||||
$request->offsetUnset('use_build_secrets');
|
||||
|
||||
@@ -119,14 +119,9 @@ function loadGiteaRepositories(GiteaApp $source, int $page = 1): array
|
||||
$repositories = collect($response->json());
|
||||
$hasMore = count($response->json()) === GITEA_PAGE_SIZE;
|
||||
|
||||
$organizations = collect(explode(',', (string) $source->organization))
|
||||
->map(fn ($organization) => strtolower(trim($organization)))
|
||||
->filter();
|
||||
if ($organizations->isNotEmpty()) {
|
||||
$repositories = $repositories->filter(
|
||||
fn ($repository) => $organizations->contains(strtolower((string) data_get($repository, 'owner.login')))
|
||||
);
|
||||
}
|
||||
$repositories = $repositories->filter(
|
||||
fn ($repository) => $source->allowsRepositoryOwner(data_get($repository, 'owner.login'))
|
||||
);
|
||||
|
||||
return [
|
||||
'total_count' => $repositories->count(),
|
||||
|
||||
Reference in New Issue
Block a user