aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/incoming/hooks
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--forged/internal/incoming/hooks/config.go6
-rw-r--r--forged/internal/incoming/hooks/hooks.go7
2 files changed, 4 insertions, 9 deletions
diff --git a/forged/internal/incoming/hooks/config.go b/forged/internal/incoming/hooks/config.go
deleted file mode 100644
index 0d23dc0..0000000
--- a/forged/internal/incoming/hooks/config.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package hooks
-
-type Config struct {
- Socket string `scfg:"socket"`
- Execs string `scfg:"execs"`
-}
diff --git a/forged/internal/incoming/hooks/hooks.go b/forged/internal/incoming/hooks/hooks.go
index dfdf172..effd104 100644
--- a/forged/internal/incoming/hooks/hooks.go
+++ b/forged/internal/incoming/hooks/hooks.go
@@ -32,10 +32,11 @@ type hookInfo struct {
contribReq string
}
-func New(config Config, global *global.Global) (server *Server) {
+func New(global *global.Global) (server *Server) {
+ cfg := global.Config.Hooks
return &Server{
- socketPath: config.Socket,
- executablesPath: config.Execs,
+ socketPath: cfg.Socket,
+ executablesPath: cfg.Execs,
hookMap: cmap.Map[string, hookInfo]{},
global: global,
}