feat: add external repository support for config profile git mounts

- Add POST /repositories endpoint for external repos (no project_id)
- Update GitRepositoryResponse to allow nullable project_id
- Update list_repositories to support listing all user repos
- Add _pull_repository_updates for auto-pull on container creation
- Update git mount validation to allow external repos
- Frontend: Update listRepositories to support optional projectId
- Spec updates: external repos, auto-clone, per-instance isolation
This commit is contained in:
Alex Blank
2026-05-27 11:03:12 +02:00
parent 943b9db5c7
commit e07938098a
5 changed files with 187 additions and 11 deletions
+9 -2
View File
@@ -35,8 +35,15 @@ export async function parseGitUrl(url: string): Promise<URLParseResult> {
return response.data;
}
export async function listRepositories(projectId: string): Promise<GitRepository[]> {
const response = await apiClient.get(`/projects/${projectId}/repositories`);
export async function listRepositories(projectId?: string): Promise<GitRepository[]> {
if (projectId) {
const response = await apiClient.get<GitRepository[]>(
`/projects/${projectId}/repositories`
);
return response.data;
}
// List all user repositories (including external)
const response = await apiClient.get<GitRepository[]>("/repositories");
return response.data;
}