Implement git handlers integration test

This commit is contained in:
2024-11-29 23:14:36 +01:00
parent 6aa3fd6c65
commit 1ddf93a8be
6 changed files with 352 additions and 11 deletions

View File

@@ -52,6 +52,19 @@ func (h *Handler) CreateWorkspace() http.HandlerFunc {
return
}
if workspace.GitEnabled {
if err := h.Storage.SetupGitRepo(
ctx.UserID,
workspace.ID,
workspace.GitURL,
workspace.GitUser,
workspace.GitToken,
); err != nil {
http.Error(w, "Failed to setup git repo: "+err.Error(), http.StatusInternalServerError)
return
}
}
respondJSON(w, workspace)
}
}