Add WIP proper webhook support (for gitea)
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user