Move webhook into models/webhook/ (#17579)

This commit is contained in:
Lunny Xiao 2021-11-10 13:13:16 +08:00 committed by GitHub
parent edbaa5d3f0
commit 33fca2b537
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 770 additions and 717 deletions

View file

@ -8,7 +8,7 @@ import (
"net/url"
"testing"
"code.gitea.io/gitea/models"
webhook_model "code.gitea.io/gitea/models/webhook"
api "code.gitea.io/gitea/modules/structs"
"github.com/stretchr/testify/assert"
@ -163,7 +163,7 @@ func TestDingTalkPayload(t *testing.T) {
p.Action = api.HookIssueReviewed
d := new(DingtalkPayload)
pl, err := d.Review(p, models.HookEventPullRequestReviewApproved)
pl, err := d.Review(p, webhook_model.HookEventPullRequestReviewApproved)
require.NoError(t, err)
require.NotNil(t, pl)
require.IsType(t, &DingtalkPayload{}, pl)