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

Function getActiveWebhooksByOrgID

internal/database/webhook.go:354–357  ·  view source on GitHub ↗

getActiveWebhooksByOrgID returns all active webhooks for an organization.

(e Engine, orgID int64)

Source from the content-addressed store, hash-verified

352
353// getActiveWebhooksByOrgID returns all active webhooks for an organization.
354func getActiveWebhooksByOrgID(e Engine, orgID int64) ([]*Webhook, error) {
355 ws := make([]*Webhook, 0, 3)
356 return ws, e.Where("org_id=?", orgID).And("is_active=?", true).Find(&ws)
357}
358
359// ___ ___ __ ___________ __
360// / | \ ____ ____ | | _\__ ___/____ _____| | __

Callers 1

prepareWebhooksFunction · 0.85

Calls 2

WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected