mirror of
https://github.com/go-gitea/gitea
synced 2025-07-13 14:07:20 +00:00
Add tests for webhook and fix some webhook bugs (#33396)
This PR created a mock webhook server in the tests and added integration tests for generic webhooks. It also fixes bugs in package webhooks and pull request comment webhooks.
This commit is contained in:
@ -277,6 +277,10 @@ func newDiscordRequest(_ context.Context, w *webhook_model.Webhook, t *webhook_m
|
||||
return newJSONRequest(pc, w, t, true)
|
||||
}
|
||||
|
||||
func init() {
|
||||
RegisterWebhookRequester(webhook_module.DISCORD, newDiscordRequest)
|
||||
}
|
||||
|
||||
func parseHookPullRequestEventType(event webhook_module.HookEventType) (string, error) {
|
||||
switch event {
|
||||
case webhook_module.HookEventPullRequestReviewApproved:
|
||||
|
Reference in New Issue
Block a user