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

Function HookTasks

internal/database/webhook.go:504–507  ·  view source on GitHub ↗

HookTasks returns a list of hook tasks by given conditions.

(hookID int64, page int)

Source from the content-addressed store, hash-verified

502
503// HookTasks returns a list of hook tasks by given conditions.
504func HookTasks(hookID int64, page int) ([]*HookTask, error) {
505 tasks := make([]*HookTask, 0, conf.Webhook.PagingNum)
506 return tasks, x.Limit(conf.Webhook.PagingNum, (page-1)*conf.Webhook.PagingNum).Where("hook_id=?", hookID).Desc("id").Find(&tasks)
507}
508
509// createHookTask creates a new hook task,
510// it handles conversion from Payload to PayloadContent.

Callers 1

HistoryMethod · 0.85

Calls 2

WhereMethod · 0.80
FindMethod · 0.65

Tested by

no test coverage detected