mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
+Github webhooks
This commit is contained in:
@@ -72,6 +72,12 @@ func (c *ConfigProvider) Validate() error {
|
||||
if strings.TrimSpace(c.Config.BaseDIR) == "" {
|
||||
return fmt.Errorf("Base directory path not set")
|
||||
}
|
||||
|
||||
// Validate webhook configuration: if endpoint is set, secret must also be set
|
||||
if strings.TrimSpace(c.Config.WebHookEndpoint) != "" && strings.TrimSpace(c.Config.WebHookSecret) == "" {
|
||||
return fmt.Errorf("WebHookSecret must be configured when WebHookEndpoint is set")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user