TestWebhook adds the test webhook matches the ID to task queue.
(repo *Repository, event HookEventType, p api.Payloader, webhookID int64)
| 686 | |
| 687 | // TestWebhook adds the test webhook matches the ID to task queue. |
| 688 | func TestWebhook(repo *Repository, event HookEventType, p api.Payloader, webhookID int64) error { |
| 689 | webhook, err := GetWebhookOfRepoByID(repo.ID, webhookID) |
| 690 | if err != nil { |
| 691 | return errors.Newf("GetWebhookOfRepoByID [repo_id: %d, id: %d]: %v", repo.ID, webhookID, err) |
| 692 | } |
| 693 | return prepareHookTasks(x, repo, event, p, []*Webhook{webhook}) |
| 694 | } |
| 695 | |
| 696 | func (t *HookTask) deliver() { |
| 697 | payloadURL, err := url.Parse(t.URL) |
no test coverage detected