+Github webhooks

This commit is contained in:
Simon Martens
2025-09-28 18:13:26 +02:00
parent 3b19ea94b6
commit 2bf6315f50
5 changed files with 27 additions and 18 deletions

View File

@@ -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
}