MCPcopy Index your code
hub / github.com/gogs/gogs / PrepareWebhooks

Function PrepareWebhooks

internal/database/webhook.go:678–685  ·  view source on GitHub ↗

PrepareWebhooks adds all active webhooks to task queue.

(repo *Repository, event HookEventType, p api.Payloader)

Source from the content-addressed store, hash-verified

676
677// PrepareWebhooks adds all active webhooks to task queue.
678func PrepareWebhooks(repo *Repository, event HookEventType, p api.Payloader) error {
679 // NOTE: To prevent too many cascading changes in a single refactoring PR, we
680 // choose to ignore this function in tests.
681 if x == nil && testutil.InTest {
682 return nil
683 }
684 return prepareWebhooks(x, repo, event, p)
685}
686
687// TestWebhook adds the test webhook matches the ID to task queue.
688func TestWebhook(repo *Repository, event HookEventType, p api.Payloader, webhookID int64) error {

Callers 15

DeleteBranchPostFunction · 0.92
ChangeMilestoneAssignFunction · 0.85
CreateIssueCommentFunction · 0.85
UpdateCommentFunction · 0.85
DeleteCommentByIDFunction · 0.85
MergeMethod · 0.85
NewPullRequestFunction · 0.85
AddTestPullRequestTaskFunction · 0.85
MirrorSyncPushMethod · 0.85
CommitRepoMethod · 0.85
PushTagMethod · 0.85

Calls 1

prepareWebhooksFunction · 0.85

Tested by

no test coverage detected