MCPcopy Create free account
hub / github.com/gogs/gogs / UpdateEvent

Method UpdateEvent

internal/database/webhook.go:154–158  ·  view source on GitHub ↗

UpdateEvent handles conversion from HookEvent to Events.

()

Source from the content-addressed store, hash-verified

152
153// UpdateEvent handles conversion from HookEvent to Events.
154func (w *Webhook) UpdateEvent() error {
155 data, err := jsoniter.Marshal(w.HookEvent)
156 w.Events = string(data)
157 return err
158}
159
160// HasCreateEvent returns true if hook enabled create event.
161func (w *Webhook) HasCreateEvent() bool {

Callers 4

CreateHookFunction · 0.95
validateAndCreateWebhookFunction · 0.80
validateAndUpdateWebhookFunction · 0.80
EditHookFunction · 0.80

Calls 1

stringFunction · 0.85

Tested by

no test coverage detected