feat: allow creating external repositories directly from git mount editor

- Add createExternalRepository API function
- Update GitMountEditor with "+ Add new repository..." option
- Show form to enter repo name and remote URL
- Auto-create external repo and refresh list on success
- Update config-profiles page to pass onCreateRepository handler
This commit is contained in:
Alex Blank
2026-05-27 11:17:27 +02:00
parent f14fc37e75
commit baabd1fa62
4 changed files with 137 additions and 17 deletions
+7
View File
@@ -60,6 +60,13 @@ export async function createRepository(
return response.data;
}
export async function createExternalRepository(
data: GitRepositoryCreate
): Promise<GitRepository> {
const response = await apiClient.post<GitRepository>("/repositories", data);
return response.data;
}
export async function deleteRepository(projectId: string, repoId: string): Promise<void> {
await apiClient.delete(`/projects/${projectId}/repositories/${repoId}`);
}