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

Function getActiveWebhooksByRepoID

internal/database/webhook.go:296–299  ·  view source on GitHub ↗

getActiveWebhooksByRepoID returns all active webhooks of repository.

(e Engine, repoID int64)

Source from the content-addressed store, hash-verified

294
295// getActiveWebhooksByRepoID returns all active webhooks of repository.
296func getActiveWebhooksByRepoID(e Engine, repoID int64) ([]*Webhook, error) {
297 webhooks := make([]*Webhook, 0, 5)
298 return webhooks, e.Where("repo_id = ?", repoID).And("is_active = ?", true).Find(&webhooks)
299}
300
301// GetWebhooksByRepoID returns all webhooks of a repository.
302func GetWebhooksByRepoID(repoID int64) ([]*Webhook, error) {

Callers 1

prepareWebhooksFunction · 0.85

Calls 2

WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected