mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-01 04:54:09 +00:00
15c64122a6
- When a comment was updated or deleted and was part of an pending/ongoing review, it would have triggered a notification, such as a webhook. - This patch checks if the comment is part of a pending review and then does not fire a notification and, in the case of updating a comment, does not save the content history because this is not necessary if it is still a "draft" comment given it is a pending comment (there is no need to see my embarrassing typos). - Adds integration tests. - Resolves https://codeberg.org/forgejo/forgejo/issues/4368
24 lines
455 B
Go
24 lines
455 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package issue
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"code.gitea.io/gitea/models/unittest"
|
|
"code.gitea.io/gitea/modules/setting"
|
|
"code.gitea.io/gitea/services/webhook"
|
|
|
|
_ "code.gitea.io/gitea/models/actions"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
unittest.MainTest(m, &unittest.TestOptions{
|
|
SetUp: func() error {
|
|
setting.LoadQueueSettings()
|
|
return webhook.Init()
|
|
},
|
|
})
|
|
}
|