diff options
author | delvh <leon@kske.dev> | 2023-01-01 16:23:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-01 23:23:15 +0800 |
commit | 0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da (patch) | |
tree | 4514951316ebfb10dabf1ffbc856142839817a80 /services/webhook/slack_test.go | |
parent | f8e93ce4238253c01e3ca36c88eb59979be99d12 (diff) | |
download | gitea-0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da.tar.gz gitea-0f4e1b9ac66b8ffa0083a5a2516e4710393bb0da.zip |
Restructure `webhook` module (#22256)
Previously, there was an `import services/webhooks` inside
`modules/notification/webhook`.
This import was removed (after fighting against many import cycles).
Additionally, `modules/notification/webhook` was moved to
`modules/webhook`,
and a few structs/constants were extracted from `models/webhooks` to
`modules/webhook`.
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/webhook/slack_test.go')
-rw-r--r-- | services/webhook/slack_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/slack_test.go b/services/webhook/slack_test.go index db97b351c5..d9828f374f 100644 --- a/services/webhook/slack_test.go +++ b/services/webhook/slack_test.go @@ -6,8 +6,8 @@ package webhook import ( "testing" - webhook_model "code.gitea.io/gitea/models/webhook" api "code.gitea.io/gitea/modules/structs" + webhook_module "code.gitea.io/gitea/modules/webhook" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -124,7 +124,7 @@ func TestSlackPayload(t *testing.T) { p.Action = api.HookIssueReviewed d := new(SlackPayload) - pl, err := d.Review(p, webhook_model.HookEventPullRequestReviewApproved) + pl, err := d.Review(p, webhook_module.HookEventPullRequestReviewApproved) require.NoError(t, err) require.NotNil(t, pl) require.IsType(t, &SlackPayload{}, pl) |