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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user