aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook/payloader.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-10-31 12:43:38 +0800
committerGitHub <noreply@github.com>2023-10-31 04:43:38 +0000
commit16d15ce087cd4b9ddf91f6acff7eacac24e6aac5 (patch)
treea71425c3ab1c5ee0c3ca6a8b8eaefd1367ecbfc8 /services/webhook/payloader.go
parent9106514e516f1e75ae539f3cd2f3a794c7d2c50a (diff)
downloadgitea-16d15ce087cd4b9ddf91f6acff7eacac24e6aac5.tar.gz
gitea-16d15ce087cd4b9ddf91f6acff7eacac24e6aac5.zip
Fix package webhook (#27839)
Fix #23742 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'services/webhook/payloader.go')
-rw-r--r--services/webhook/payloader.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/webhook/payloader.go b/services/webhook/payloader.go
index d53e65fa5e..bd482c04ea 100644
--- a/services/webhook/payloader.go
+++ b/services/webhook/payloader.go
@@ -22,6 +22,7 @@ type PayloadConvertor interface {
Repository(*api.RepositoryPayload) (api.Payloader, error)
Release(*api.ReleasePayload) (api.Payloader, error)
Wiki(*api.WikiPayload) (api.Payloader, error)
+ Package(*api.PackagePayload) (api.Payloader, error)
}
func convertPayloader(s PayloadConvertor, p api.Payloader, event webhook_module.HookEventType) (api.Payloader, error) {
@@ -53,6 +54,8 @@ func convertPayloader(s PayloadConvertor, p api.Payloader, event webhook_module.
return s.Release(p.(*api.ReleasePayload))
case webhook_module.HookEventWiki:
return s.Wiki(p.(*api.WikiPayload))
+ case webhook_module.HookEventPackage:
+ return s.Package(p.(*api.PackagePayload))
}
return s, nil
}