Monorepo for Tangled tangled.org

knotserver: setup hooks for forks too

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 1c8c3ea1 33b204aa

verified
Changed files
+13 -9
knotserver
+13 -9
knotserver/routes.go
··· 674 return 675 } 676 677 - err = hook.SetupRepo(hook.Config( 678 - hook.WithScanPath(h.c.Repo.ScanPath), 679 - hook.WithInternalApi(h.c.Server.InternalListenAddr), 680 - ), 681 repoPath, 682 ) 683 - if err != nil { 684 - l.Error("setting up hooks", "error", err.Error()) 685 - writeError(w, err.Error(), http.StatusInternalServerError) 686 - return 687 - } 688 689 w.WriteHeader(http.StatusNoContent) 690 } ··· 933 writeError(w, err.Error(), http.StatusInternalServerError) 934 return 935 } 936 937 w.WriteHeader(http.StatusNoContent) 938 }
··· 674 return 675 } 676 677 + hook.SetupRepo( 678 + hook.Config( 679 + hook.WithScanPath(h.c.Repo.ScanPath), 680 + hook.WithInternalApi(h.c.Server.InternalListenAddr), 681 + ), 682 repoPath, 683 ) 684 685 w.WriteHeader(http.StatusNoContent) 686 } ··· 929 writeError(w, err.Error(), http.StatusInternalServerError) 930 return 931 } 932 + 933 + hook.SetupRepo( 934 + hook.Config( 935 + hook.WithScanPath(h.c.Repo.ScanPath), 936 + hook.WithInternalApi(h.c.Server.InternalListenAddr), 937 + ), 938 + repoPath, 939 + ) 940 941 w.WriteHeader(http.StatusNoContent) 942 }