···31 w.Write([]byte("This is a knot server. More info at https://tangled.sh"))
32}
3300000000000000000034func (h *Handle) RepoIndex(w http.ResponseWriter, r *http.Request) {
35 path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
36 l := h.l.With("path", path, "handler", "RepoIndex")
···31 w.Write([]byte("This is a knot server. More info at https://tangled.sh"))
32}
3334+func (h *Handle) Capabilities(w http.ResponseWriter, r *http.Request) {
35+ w.Header().Set("Content-Type", "application/json")
36+37+ capabilities := map[string]any{
38+ "pull_requests": map[string]any{
39+ "patch_submissions": true,
40+ },
41+ }
42+43+ jsonData, err := json.Marshal(capabilities)
44+ if err != nil {
45+ http.Error(w, "Failed to serialize JSON", http.StatusInternalServerError)
46+ return
47+ }
48+49+ w.Write(jsonData)
50+}
51+52func (h *Handle) RepoIndex(w http.ResponseWriter, r *http.Request) {
53 path, _ := securejoin.SecureJoin(h.c.Repo.ScanPath, didPath(r))
54 l := h.l.With("path", path, "handler", "RepoIndex")