From c58207943872cf04355ecac91e2ad47a8341c9c7 Mon Sep 17 00:00:00 2001 From: zhuxiaoyang Date: Tue, 15 Oct 2019 10:41:40 +0800 Subject: [PATCH] fix github webhook Content type support Signed-off-by: zhuxiaoyang --- pkg/apis/devops/v1alpha2/register.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apis/devops/v1alpha2/register.go b/pkg/apis/devops/v1alpha2/register.go index 4c92e8ac1..ea7668192 100644 --- a/pkg/apis/devops/v1alpha2/register.go +++ b/pkg/apis/devops/v1alpha2/register.go @@ -782,6 +782,7 @@ The last one is encrypted info, such as the password of the username-password ty webservice.Route(webservice.POST("/webhook/github"). To(devopsapi.GithubWebhook). + Consumes("application/x-www-form-urlencoded", "application/json"). Metadata(restfulspec.KeyOpenAPITags, []string{constants.DevOpsWebhookTag}). Doc("Get commit notification. Github webhook will request here."))