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