Add WIP proper webhook support (for gitea)

This commit is contained in:
2022-12-23 23:54:53 -07:00
parent 46245b73c9
commit b29d3a8f80
6 changed files with 2233 additions and 60 deletions
+14
View File
@@ -0,0 +1,14 @@
package util
import "git.ohea.xyz/cursorius/server/config"
// Generated map for webhook handler config
func CreateWebhookConfig(conf map[string]config.Job) map[string]config.Webhook {
webhookConfig := make(map[string]config.Webhook, 0)
for k, v := range conf {
if v.Webhook != nil {
webhookConfig[k] = *v.Webhook
}
}
return webhookConfig
}