gitea/models
Lunny Xiao 23971a77a0
Add tests for webhook and fix some webhook bugs () ()
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 also corrected an error on the package webhook. The previous
implementation uses a `User` struct as an organization, now it has been
corrected but it will not be consistent with the previous
implementation, some fields which not belong to the organization have
been removed.

Backport 
Backport part of 
2025-02-02 14:44:50 +08:00
..
actions Use env GITEA_RUNNER_REGISTRATION_TOKEN as global runner token () () 2024-12-24 00:37:11 +08:00
activities Add missed auto merge feed message on dashboard () () 2025-01-26 18:57:45 +00:00
admin Fix javascript error when an anonymous user visiting migration page () 2024-10-02 04:37:16 +00:00
asymkey Use ProtonMail/go-crypto to replace keybase/go-crypto () () 2025-01-27 02:50:00 +00:00
auth Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
avatars Replace 10 more gt- classes with tw- () 2024-03-22 13:45:10 +00:00
db Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
dbfs Enable `unparam` linter () 2024-06-11 18:47:45 +00:00
fixtures Refactor testfixtures () 2024-12-30 02:49:49 +00:00
git Improve sync fork behavior () () 2025-01-20 07:50:38 +00:00
issues Make tracked time representation display as hours () () 2025-01-21 06:49:58 +08:00
migrations Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
organization Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
packages Refactor maven package registry () () 2024-12-31 15:22:09 +08:00
perm Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
project Use project's redirect url instead of composing url () () 2024-12-31 20:06:35 +08:00
pull Add support for sha256 repositories () 2024-01-19 17:05:02 +01:00
renderhelper Refactor render system (orgmode) () 2024-11-29 16:08:29 +08:00
repo Fix missing license when sync mirror () () 2025-01-14 06:26:27 +00:00
secret Clarify Actions resources ownership () 2024-08-01 09:04:04 +00:00
shared/types Refactor locale&string&template related code () 2024-02-14 21:48:45 +00:00
system Refactor deletion () 2023-12-25 21:25:29 +01:00
unit Add `DEFAULT_MIRROR_REPO_UNITS` and `DEFAULT_TEMPLATE_REPO_UNITS` options () 2024-11-11 00:11:00 +00:00
unittest Refactor testfixtures () 2024-12-30 02:49:49 +00:00
user Fix user avatar () 2025-01-30 17:11:13 +08:00
webhook Add tests for webhook and fix some webhook bugs () () 2025-02-02 14:44:50 +08:00
error.go Add merge style `fast-forward-only` () 2024-02-12 23:37:23 +01:00
main_test.go make writing main test easier () 2023-09-28 01:38:53 +00:00
repo.go Fix issue comment number () () 2024-12-31 07:54:40 +08:00
repo_test.go Fix issue comment number () () 2024-12-31 07:54:40 +08:00
repo_transfer.go chore: use errors.New to replace fmt.Errorf with no parameters will much better () 2024-04-21 19:44:03 +00:00