Set correct content_type value for Gogs/Gitea webhooks (#9504) (#10456) (#11461)

The content_type value was defaulting to the string value of the
ContentType, not the integer value as expected by the backend.

Co-authored-by: Jeff Stein <jeff@jeffvstein.org>
This commit is contained in:
zeripath 2020-05-17 20:08:59 +01:00 committed by GitHub
parent 04e480d477
commit 2cb3db2d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 41 deletions

View file

@ -21,7 +21,7 @@
<div class="field"> <div class="field">
<label>{{.i18n.Tr "repo.settings.content_type"}}</label> <label>{{.i18n.Tr "repo.settings.content_type"}}</label>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}"> <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
<div class="default text"></div> <div class="default text"></div>
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="menu"> <div class="menu">

View file

@ -9,7 +9,7 @@
<div class="field"> <div class="field">
<label>{{.i18n.Tr "repo.settings.content_type"}}</label> <label>{{.i18n.Tr "repo.settings.content_type"}}</label>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}"> <input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}1{{end}}">
<div class="default text"></div> <div class="default text"></div>
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
<div class="menu"> <div class="menu">