Fix bug for webhook and feishu caused by API changed (#13937)

* Fix bug for webhook

* Fix bug for feishu
This commit is contained in:
Lunny Xiao 2020-12-12 00:04:04 +08:00 committed by GitHub
parent b35546631e
commit ea914d0f7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 57 deletions

View file

@ -144,7 +144,7 @@ func prepareWebhook(w *models.Webhook, repo *models.Repository, event models.Hoo
var payloader api.Payloader
var err error
webhook, ok := webhooks[w.Type]
webhook, ok := webhooks[strings.TrimSpace(w.Type)] // NOTICE: w.Type maynot be trimmed before store into database
if ok {
payloader, err = webhook.payloadCreator(p, event, w.Meta)
if err != nil {